From 10823e3ba7a8cc4100fc56a5197421c71fc52042 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Tue, 24 Sep 2024 01:05:21 -0300 Subject: [PATCH 01/29] fix: nil value on soul war quest and log to debug (#2906) Resolves #2897 --- data-otservbr-global/lib/quests/soul_war.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data-otservbr-global/lib/quests/soul_war.lua b/data-otservbr-global/lib/quests/soul_war.lua index a9e9d920e91..668c67f92b9 100644 --- a/data-otservbr-global/lib/quests/soul_war.lua +++ b/data-otservbr-global/lib/quests/soul_war.lua @@ -1112,9 +1112,9 @@ function MonsterType:calculateBagYouDesireChance(player, itemChance) itemChance = itemChance + (playerTaintLevel * SoulWarQuest.bagYouDesireChancePerTaint) end - logger.info("Player {} killed {} with {} taints, loot chance {}", player:getName(), monsterName, playerTaintLevel, itemChance) + logger.debug("Player {} killed {} with {} taints, loot chance {}", player:getName(), monsterName, playerTaintLevel, itemChance) - if math.random(1, 100000) <= totalChance then + if math.random(1, 100000) <= itemChance then logger.debug("Player {} killed {} and got a bag you desire with drop chance {}", player:getName(), monsterName, itemChance) if monsterName == "Goshnar's Megalomania" then -- Reset kill count on successful drop From a28960238fd9b68f134326189a534e353cc179fb Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 24 Sep 2024 17:31:04 -0300 Subject: [PATCH 02/29] fix: remove non-existent 'pet' flag from monsters (#2890) Removed the non-existent 'pet' flag from monsters to avoid unnecessary errors and improve data consistency. No other changes were made to the monster configurations. --- data-canary/monster/demons/demon.lua | 1 - data-canary/monster/demons/destroyer.lua | 1 - data-canary/monster/demons/hellhound.lua | 1 - data-canary/monster/demons/hellspawn.lua | 1 - data-canary/monster/demons/juggernaut.lua | 1 - data-canary/monster/dragons/dragon.lua | 1 - data-canary/monster/dragons/dragon_lord.lua | 1 - data-canary/monster/dragons/hydra.lua | 1 - data-canary/monster/dragons/ice_dragon.lua | 1 - data-canary/monster/dragons/wyrm.lua | 1 - data-canary/monster/giants/behemoth.lua | 1 - data-canary/monster/giants/cyclops_drone.lua | 1 - data-canary/monster/giants/cyclops_smith.lua | 1 - data-canary/monster/humanoids/frost_troll.lua | 1 - data-canary/monster/humanoids/goblin.lua | 1 - data-canary/monster/humanoids/island_troll.lua | 1 - data-canary/monster/humanoids/troll.lua | 1 - data-canary/monster/humans/amazon.lua | 1 - data-canary/monster/humans/assassin.lua | 1 - data-canary/monster/humans/bandit.lua | 1 - data-canary/monster/humans/hunter.lua | 1 - data-canary/monster/humans/monk.lua | 1 - data-canary/monster/humans/valkyrie.lua | 1 - data-canary/monster/mammals/bat.lua | 1 - data-canary/monster/mammals/cave_rat.lua | 1 - data-canary/monster/mammals/winter_wolf.lua | 1 - data-canary/monster/mammals/wolf.lua | 1 - data-canary/monster/reptiles/crocodile.lua | 1 - data-canary/monster/reptiles/snake.lua | 1 - data-canary/monster/reptiles/tortoise.lua | 1 - data-canary/monster/slimes/defiler.lua | 1 - data-canary/monster/slimes/slime.lua | 1 - data-canary/monster/undeads/ghoul.lua | 1 - data-canary/monster/undeads/mummy.lua | 1 - data-canary/monster/undeads/skeleton.lua | 1 - data-canary/monster/vermins/poison_spider.lua | 1 - data-canary/monster/vermins/sandcrawler.lua | 1 - data-canary/monster/vermins/spider.lua | 1 - data-canary/monster/vermins/wasp.lua | 1 - .../event_creatures/memory_creatures/memory_of_a_carnisylvan.lua | 1 - .../monster/quests/soul_war/goshnar's_megalomania_blue.lua | 1 - .../monster/quests/soul_war/goshnar's_megalomania_green.lua | 1 - .../monster/quests/soul_war/goshnar's_megalomania_purple.lua | 1 - .../monster/quests/soul_war/goshnars_cruelty.lua | 1 - data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua | 1 - data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua | 1 - data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua | 1 - data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua | 1 - .../normal_monsters/burning_hatred/ashes_of_burning_hatred.lua | 1 - .../normal_monsters/burning_hatred/blaze_of_burning_hatred.lua | 1 - .../normal_monsters/burning_hatred/flame_of_burning_hatred.lua | 1 - .../normal_monsters/burning_hatred/spark_of_burning_hatred.lua | 1 - .../soul_war/normal_monsters/burning_hatred/symbol_of_hatred.lua | 1 - .../soul_war/normal_monsters/furious_crater/a_greedy_eye.lua | 1 - .../quests/soul_war/normal_monsters/furious_crater/poor_soul.lua | 1 - .../megalomania_room/greater_splinter_of_madness.lua | 1 - .../megalomania_room/lesser_splinter_of_madness.lua | 1 - .../megalomania_room/mighty_splinter_of_madness.lua | 1 - .../normal_monsters/megalomania_room/necromantic_focus.lua | 1 - data-otservbr-global/monster/quests/soul_war/weeping_soul.lua | 1 - data-otservbr-global/monster/undeads/ahau.lua | 1 - 61 files changed, 61 deletions(-) diff --git a/data-canary/monster/demons/demon.lua b/data-canary/monster/demons/demon.lua index 37c6d1c6f25..763911485e7 100644 --- a/data-canary/monster/demons/demon.lua +++ b/data-canary/monster/demons/demon.lua @@ -67,7 +67,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/demons/destroyer.lua b/data-canary/monster/demons/destroyer.lua index 7c6bfa0ee7b..2dfa594ee82 100644 --- a/data-canary/monster/demons/destroyer.lua +++ b/data-canary/monster/demons/destroyer.lua @@ -63,7 +63,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/demons/hellhound.lua b/data-canary/monster/demons/hellhound.lua index 4af37f63a6b..de0430ca639 100644 --- a/data-canary/monster/demons/hellhound.lua +++ b/data-canary/monster/demons/hellhound.lua @@ -64,7 +64,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/demons/hellspawn.lua b/data-canary/monster/demons/hellspawn.lua index f405a08fbd4..44fa905fa9a 100644 --- a/data-canary/monster/demons/hellspawn.lua +++ b/data-canary/monster/demons/hellspawn.lua @@ -63,7 +63,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/demons/juggernaut.lua b/data-canary/monster/demons/juggernaut.lua index 704ce847f13..fa8947d54a7 100644 --- a/data-canary/monster/demons/juggernaut.lua +++ b/data-canary/monster/demons/juggernaut.lua @@ -64,7 +64,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/dragons/dragon.lua b/data-canary/monster/dragons/dragon.lua index 5c9b6f072a0..6d6d1567779 100644 --- a/data-canary/monster/dragons/dragon.lua +++ b/data-canary/monster/dragons/dragon.lua @@ -68,7 +68,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = true, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/dragons/dragon_lord.lua b/data-canary/monster/dragons/dragon_lord.lua index ba8042c99a6..702a1d9af28 100644 --- a/data-canary/monster/dragons/dragon_lord.lua +++ b/data-canary/monster/dragons/dragon_lord.lua @@ -69,7 +69,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/dragons/hydra.lua b/data-canary/monster/dragons/hydra.lua index a2927a36b7d..f665de1a1aa 100644 --- a/data-canary/monster/dragons/hydra.lua +++ b/data-canary/monster/dragons/hydra.lua @@ -68,7 +68,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/dragons/ice_dragon.lua b/data-canary/monster/dragons/ice_dragon.lua index 414dd8a98f0..9d7752859e3 100644 --- a/data-canary/monster/dragons/ice_dragon.lua +++ b/data-canary/monster/dragons/ice_dragon.lua @@ -63,7 +63,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/dragons/wyrm.lua b/data-canary/monster/dragons/wyrm.lua index d93a500148d..7aea11e44a2 100644 --- a/data-canary/monster/dragons/wyrm.lua +++ b/data-canary/monster/dragons/wyrm.lua @@ -64,7 +64,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/giants/behemoth.lua b/data-canary/monster/giants/behemoth.lua index 1843aba91a7..8a6abbdc02f 100644 --- a/data-canary/monster/giants/behemoth.lua +++ b/data-canary/monster/giants/behemoth.lua @@ -63,7 +63,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/giants/cyclops_drone.lua b/data-canary/monster/giants/cyclops_drone.lua index 1feef59ea39..5ce3edbedb3 100644 --- a/data-canary/monster/giants/cyclops_drone.lua +++ b/data-canary/monster/giants/cyclops_drone.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/giants/cyclops_smith.lua b/data-canary/monster/giants/cyclops_smith.lua index b2eaeb4bc3f..6b0161ce5ce 100644 --- a/data-canary/monster/giants/cyclops_smith.lua +++ b/data-canary/monster/giants/cyclops_smith.lua @@ -62,7 +62,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humanoids/frost_troll.lua b/data-canary/monster/humanoids/frost_troll.lua index 9305c0a5712..531419b333f 100644 --- a/data-canary/monster/humanoids/frost_troll.lua +++ b/data-canary/monster/humanoids/frost_troll.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humanoids/goblin.lua b/data-canary/monster/humanoids/goblin.lua index 712d1ad0321..c232303a02f 100644 --- a/data-canary/monster/humanoids/goblin.lua +++ b/data-canary/monster/humanoids/goblin.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humanoids/island_troll.lua b/data-canary/monster/humanoids/island_troll.lua index a08c76ddb25..dcc7b486d05 100644 --- a/data-canary/monster/humanoids/island_troll.lua +++ b/data-canary/monster/humanoids/island_troll.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humanoids/troll.lua b/data-canary/monster/humanoids/troll.lua index 74c303043ed..6916c409d03 100644 --- a/data-canary/monster/humanoids/troll.lua +++ b/data-canary/monster/humanoids/troll.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humans/amazon.lua b/data-canary/monster/humans/amazon.lua index 1443be056c2..e73dd0be0f2 100644 --- a/data-canary/monster/humans/amazon.lua +++ b/data-canary/monster/humans/amazon.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humans/assassin.lua b/data-canary/monster/humans/assassin.lua index 5b4ab068a86..abab4ea8e7a 100644 --- a/data-canary/monster/humans/assassin.lua +++ b/data-canary/monster/humans/assassin.lua @@ -62,7 +62,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humans/bandit.lua b/data-canary/monster/humans/bandit.lua index ee884cdb586..b96b11556ad 100644 --- a/data-canary/monster/humans/bandit.lua +++ b/data-canary/monster/humans/bandit.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humans/hunter.lua b/data-canary/monster/humans/hunter.lua index fc941c0c31c..c065d8ec4ea 100644 --- a/data-canary/monster/humans/hunter.lua +++ b/data-canary/monster/humans/hunter.lua @@ -62,7 +62,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humans/monk.lua b/data-canary/monster/humans/monk.lua index cb7eecfbfb3..a14fe1936e6 100644 --- a/data-canary/monster/humans/monk.lua +++ b/data-canary/monster/humans/monk.lua @@ -63,7 +63,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/humans/valkyrie.lua b/data-canary/monster/humans/valkyrie.lua index 92b69481741..a15e734c4c8 100644 --- a/data-canary/monster/humans/valkyrie.lua +++ b/data-canary/monster/humans/valkyrie.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/mammals/bat.lua b/data-canary/monster/mammals/bat.lua index d84ffd6236a..72cda421545 100644 --- a/data-canary/monster/mammals/bat.lua +++ b/data-canary/monster/mammals/bat.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/mammals/cave_rat.lua b/data-canary/monster/mammals/cave_rat.lua index 099e2fb1dc2..cb044c709ce 100644 --- a/data-canary/monster/mammals/cave_rat.lua +++ b/data-canary/monster/mammals/cave_rat.lua @@ -62,7 +62,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/mammals/winter_wolf.lua b/data-canary/monster/mammals/winter_wolf.lua index 0768f532a01..b53742618cd 100644 --- a/data-canary/monster/mammals/winter_wolf.lua +++ b/data-canary/monster/mammals/winter_wolf.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/mammals/wolf.lua b/data-canary/monster/mammals/wolf.lua index 6184add5843..a542ef6ff5e 100644 --- a/data-canary/monster/mammals/wolf.lua +++ b/data-canary/monster/mammals/wolf.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/reptiles/crocodile.lua b/data-canary/monster/reptiles/crocodile.lua index 0d493212c50..dbadf10db52 100644 --- a/data-canary/monster/reptiles/crocodile.lua +++ b/data-canary/monster/reptiles/crocodile.lua @@ -62,7 +62,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/reptiles/snake.lua b/data-canary/monster/reptiles/snake.lua index f3bed935391..d82fdf67a34 100644 --- a/data-canary/monster/reptiles/snake.lua +++ b/data-canary/monster/reptiles/snake.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/reptiles/tortoise.lua b/data-canary/monster/reptiles/tortoise.lua index a56b44bc264..cc5afa7752c 100644 --- a/data-canary/monster/reptiles/tortoise.lua +++ b/data-canary/monster/reptiles/tortoise.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/slimes/defiler.lua b/data-canary/monster/slimes/defiler.lua index 62c68fba3e5..ac71528076b 100644 --- a/data-canary/monster/slimes/defiler.lua +++ b/data-canary/monster/slimes/defiler.lua @@ -63,7 +63,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/slimes/slime.lua b/data-canary/monster/slimes/slime.lua index f59cc2be823..df5afc349d2 100644 --- a/data-canary/monster/slimes/slime.lua +++ b/data-canary/monster/slimes/slime.lua @@ -66,7 +66,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/undeads/ghoul.lua b/data-canary/monster/undeads/ghoul.lua index c2512610363..2e12419d11b 100644 --- a/data-canary/monster/undeads/ghoul.lua +++ b/data-canary/monster/undeads/ghoul.lua @@ -67,7 +67,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/undeads/mummy.lua b/data-canary/monster/undeads/mummy.lua index 6d391772889..c856a67cb64 100644 --- a/data-canary/monster/undeads/mummy.lua +++ b/data-canary/monster/undeads/mummy.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/undeads/skeleton.lua b/data-canary/monster/undeads/skeleton.lua index a9c5d62a27d..8dac97e6575 100644 --- a/data-canary/monster/undeads/skeleton.lua +++ b/data-canary/monster/undeads/skeleton.lua @@ -62,7 +62,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/vermins/poison_spider.lua b/data-canary/monster/vermins/poison_spider.lua index c9b7ec6a0d3..afe2d7fa2ee 100644 --- a/data-canary/monster/vermins/poison_spider.lua +++ b/data-canary/monster/vermins/poison_spider.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-canary/monster/vermins/sandcrawler.lua b/data-canary/monster/vermins/sandcrawler.lua index 08c11f127fb..21340816742 100644 --- a/data-canary/monster/vermins/sandcrawler.lua +++ b/data-canary/monster/vermins/sandcrawler.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/vermins/spider.lua b/data-canary/monster/vermins/spider.lua index a93e7c93f77..d6d943cdf78 100644 --- a/data-canary/monster/vermins/spider.lua +++ b/data-canary/monster/vermins/spider.lua @@ -61,7 +61,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, - pet = false, } monster.light = { diff --git a/data-canary/monster/vermins/wasp.lua b/data-canary/monster/vermins/wasp.lua index 89cd57cb575..ce35f28e83f 100644 --- a/data-canary/monster/vermins/wasp.lua +++ b/data-canary/monster/vermins/wasp.lua @@ -63,7 +63,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_carnisylvan.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_carnisylvan.lua index 1ecfdd96e1b..901f7686874 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_carnisylvan.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_carnisylvan.lua @@ -47,7 +47,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua index 1433d2ed7d4..cfd0f53f7fa 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_blue.lua @@ -55,7 +55,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua index f6d60b0b747..8e8effb5e08 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_green.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_purple.lua b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_purple.lua index 79914af4935..7781c66516d 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_purple.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnar's_megalomania_purple.lua @@ -48,7 +48,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua index 44f87cca574..3f1cb2c4421 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua index f1f5284398e..16d995988a5 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua @@ -59,7 +59,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua index 47fedea4e7c..f218e0b7e9f 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua index e0b054dc10d..c4598e9bbe0 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua @@ -60,7 +60,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua index 40817c335b0..7501e466f54 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua @@ -59,7 +59,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/ashes_of_burning_hatred.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/ashes_of_burning_hatred.lua index 72c4082ee0e..995cad06686 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/ashes_of_burning_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/ashes_of_burning_hatred.lua @@ -49,7 +49,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/blaze_of_burning_hatred.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/blaze_of_burning_hatred.lua index c0b76ce98df..77b619b70ea 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/blaze_of_burning_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/blaze_of_burning_hatred.lua @@ -49,7 +49,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/flame_of_burning_hatred.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/flame_of_burning_hatred.lua index 483c5156fb1..20f253efa79 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/flame_of_burning_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/flame_of_burning_hatred.lua @@ -49,7 +49,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/spark_of_burning_hatred.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/spark_of_burning_hatred.lua index dc9ff25f05e..c3c9d73749f 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/spark_of_burning_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/spark_of_burning_hatred.lua @@ -49,7 +49,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/symbol_of_hatred.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/symbol_of_hatred.lua index 76d403fab1a..1f94f6998c2 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/symbol_of_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/burning_hatred/symbol_of_hatred.lua @@ -42,7 +42,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/a_greedy_eye.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/a_greedy_eye.lua index aed9dcfc829..8622ed190a2 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/a_greedy_eye.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/a_greedy_eye.lua @@ -48,7 +48,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/poor_soul.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/poor_soul.lua index 316959ddcd8..0596c7516d3 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/poor_soul.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/furious_crater/poor_soul.lua @@ -51,7 +51,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/greater_splinter_of_madness.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/greater_splinter_of_madness.lua index 2193aac5447..d96ae146165 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/greater_splinter_of_madness.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/greater_splinter_of_madness.lua @@ -51,7 +51,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/lesser_splinter_of_madness.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/lesser_splinter_of_madness.lua index 7927ac18a26..9b39776a4b7 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/lesser_splinter_of_madness.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/lesser_splinter_of_madness.lua @@ -51,7 +51,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/mighty_splinter_of_madness.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/mighty_splinter_of_madness.lua index 18dd5825b89..21d7229366b 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/mighty_splinter_of_madness.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/mighty_splinter_of_madness.lua @@ -51,7 +51,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/necromantic_focus.lua b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/necromantic_focus.lua index 53c607ace7f..9fcadf66e86 100644 --- a/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/necromantic_focus.lua +++ b/data-otservbr-global/monster/quests/soul_war/normal_monsters/megalomania_room/necromantic_focus.lua @@ -46,7 +46,6 @@ monster.flags = { canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/quests/soul_war/weeping_soul.lua b/data-otservbr-global/monster/quests/soul_war/weeping_soul.lua index 3631fa3cb8e..0c45ec43fff 100644 --- a/data-otservbr-global/monster/quests/soul_war/weeping_soul.lua +++ b/data-otservbr-global/monster/quests/soul_war/weeping_soul.lua @@ -51,7 +51,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { diff --git a/data-otservbr-global/monster/undeads/ahau.lua b/data-otservbr-global/monster/undeads/ahau.lua index 0e86a1d2c98..9d7f0f17c9c 100644 --- a/data-otservbr-global/monster/undeads/ahau.lua +++ b/data-otservbr-global/monster/undeads/ahau.lua @@ -55,7 +55,6 @@ monster.flags = { canWalkOnEnergy = true, canWalkOnFire = true, canWalkOnPoison = true, - pet = false, } monster.light = { From f0830c37d71e159b76e69090e2c07af4a59faa7e Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 24 Sep 2024 17:32:22 -0300 Subject: [PATCH 03/29] refactor: removeMoneyBank (#2887) Improved the `Player.removeMoneyBank` function to make it more efficient. It now uses intermediate variables to avoid repeated calls and simplifies the construction of the message. The logic and messages have been kept as they were. --- data/libs/functions/player.lua | 43 ++++++++++++---------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index a2fb8bc0de6..8dbd0cf9aff 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -198,43 +198,30 @@ function Player.withdrawMoney(self, amount) return Bank.withdraw(self, amount) end --- player:removeMoneyBank(money) -function Player:removeMoneyBank(amount) - if type(amount) == "string" then - amount = tonumber(amount) - end - - local moneyCount = self:getMoney() - local bankCount = self:getBankBalance() +function Player.removeMoneyBank(self, amount) + local inventoryMoney = self:getMoney() + local bankBalance = self:getBankBalance() - -- The player have all the money with him - if amount <= moneyCount then - -- Removes player inventory money + if amount <= inventoryMoney then self:removeMoney(amount) - if amount > 0 then self:sendTextMessage(MESSAGE_TRADE, ("Paid %d gold from inventory."):format(amount)) end return true + end - -- The player doens't have all the money with him - elseif amount <= (moneyCount + bankCount) then - -- Check if the player has some money - if moneyCount ~= 0 then - -- Removes player inventory money - self:removeMoney(moneyCount) - local remains = amount - moneyCount - - -- Removes player bank money - Bank.debit(self, remains) + if amount <= (inventoryMoney + bankBalance) then + local remainingAmount = amount - if amount > 0 then - self:sendTextMessage(MESSAGE_TRADE, ("Paid %s from inventory and %s gold from bank account. Your account balance is now %s gold."):format(FormatNumber(moneyCount), FormatNumber(amount - moneyCount), FormatNumber(self:getBankBalance()))) - end - return true + if inventoryMoney > 0 then + self:removeMoney(inventoryMoney) + remainingAmount = remainingAmount - inventoryMoney end - self:setBankBalance(bankCount - amount) - self:sendTextMessage(MESSAGE_TRADE, ("Paid %s gold from bank account. Your account balance is now %s gold."):format(FormatNumber(amount), FormatNumber(self:getBankBalance()))) + + Bank.debit(self, remainingAmount) + + self:setBankBalance(bankBalance - remainingAmount) + self:sendTextMessage(MESSAGE_TRADE, ("Paid %s from inventory and %s gold from bank account. Your account balance is now %s gold."):format(FormatNumber(amount - remainingAmount), FormatNumber(remainingAmount), FormatNumber(self:getBankBalance()))) return true end return false From a399c263613e7d20efc2118cf8c20ab18bd5cf97 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Tue, 24 Sep 2024 17:34:26 -0300 Subject: [PATCH 04/29] feat: transferring money bank from main/main and rookgaard/rookgaard (#2878) Rookguard town is `town id` 3, so `minTownIdToBankTransfer` defaults to 4 Resolves #2778 --- config.lua.dist | 4 +-- src/config/config_enums.hpp | 2 +- src/config/configmanager.cpp | 2 +- src/game/bank/bank.cpp | 29 +++++++++++++------ src/game/bank/bank.hpp | 2 +- .../functions/core/game/bank_functions.cpp | 13 ++++----- 6 files changed, 31 insertions(+), 21 deletions(-) diff --git a/config.lua.dist b/config.lua.dist index 89bd3e68fc3..113c6b2a4c9 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -254,7 +254,7 @@ onlyPremiumAccount = false -- NOTE: enablePlayerPutItemInAmmoSlot = true, will enable players to put any items on ammo slot, more used in custom shopping system -- NOTE: startStreakLevel will make a reward streak level for new players who never logged in -- NOTE: if showLootsInBestiary is true, will cause all loots to be shown in the bestiary even if the player has not reached the required number of kills --- NOTE: minTownIdToBankTransfer blocks towns less than defined from receiving money transfers +-- NOTE: minTownIdToBankTransferFromMain blocks towns less than defined from receiving money transfers -- NOTE: enableSupportOutfit enable GODS and GMS to select support outfit (gamemaster, customer support or community manager) stashMoving = false stashItemCount = 5000 @@ -275,7 +275,7 @@ storeInboxMaxLimit = 2000 enablePlayerPutItemInAmmoSlot = false startStreakLevel = 0 showLootsInBestiary = false -minTownIdToBankTransfer = 3 +minTownIdToBankTransferFromMain = 4 enableSupportOutfit = true -- Teleport summon diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp index bf480505014..1dfa71ce7dd 100644 --- a/src/config/config_enums.hpp +++ b/src/config/config_enums.hpp @@ -157,7 +157,7 @@ enum ConfigKey_t : uint16_t { METRICS_PROMETHEUS_ADDRESS, MIN_DELAY_BETWEEN_CONDITIONS, MIN_ELEMENTAL_RESISTANCE, - MIN_TOWN_ID_TO_BANK_TRANSFER, + MIN_TOWN_ID_TO_BANK_TRANSFER_FROM_MAIN, MOMENTUM_CHANCE_FORMULA_A, MOMENTUM_CHANCE_FORMULA_B, MOMENTUM_CHANCE_FORMULA_C, diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 80126ddac93..9ce861665de 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -283,7 +283,7 @@ bool ConfigManager::load() { loadIntConfig(L, METRICS_OSTREAM_INTERVAL, "metricsOstreamInterval", 1000); loadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, "minDelayBetweenConditions", 0); loadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, "minElementalResistance", -200); - loadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, "minTownIdToBankTransfer", 3); + loadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER_FROM_MAIN, "minTownIdToBankTransferFromMain", 4); loadIntConfig(L, MONTH_KILLS_TO_RED, "monthKillsToRedSkull", 10); loadIntConfig(L, MULTIPLIER_ATTACKONFIST, "multiplierSpeedOnFist", 5); loadIntConfig(L, ORANGE_SKULL_DURATION, "orangeSkullDuration", 7); diff --git a/src/game/bank/bank.cpp b/src/game/bank/bank.cpp index b6f3b14c6e5..33d97c92ee5 100644 --- a/src/game/bank/bank.cpp +++ b/src/game/bank/bank.cpp @@ -80,26 +80,28 @@ const std::set deniedNames = { "paladinsample" }; -bool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) { +bool Bank::transferTo(const std::shared_ptr &destination, const uint64_t amount) { if (!destination) { g_logger().error("Bank::transferTo: destination is nullptr"); return false; } - auto bankable = getBankable(); + const auto bankable = getBankable(); if (!bankable) { g_logger().error("Bank::transferTo: bankable is nullptr"); return false; } - auto destinationBankable = destination->getBankable(); + const auto destinationBankable = destination->getBankable(); if (!destinationBankable) { g_logger().error("Bank::transferTo: destinationBankable is nullptr"); return false; } - auto destinationPlayer = destinationBankable->getPlayer(); - if (destinationPlayer != nullptr) { + const auto &destinationPlayer = destinationBankable->getPlayer(); + const auto &bankablePlayer = bankable->getPlayer(); + + if (destinationPlayer && bankablePlayer) { auto name = asLowerCaseString(destinationPlayer->getName()); replaceString(name, " ", ""); @@ -108,8 +110,17 @@ bool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) return false; } - if (destinationPlayer->getTown()->getID() < g_configManager().getNumber(MIN_TOWN_ID_TO_BANK_TRANSFER, __FUNCTION__)) { - g_logger().warn("Bank::transferTo: denied town: {}", destinationPlayer->getTown()->getID()); + const auto destinationTownId = destinationPlayer->getTown()->getID(); + const auto bankableTownId = bankablePlayer->getTown()->getID(); + const auto minTownIdToTransferFromMain = g_configManager().getNumber(MIN_TOWN_ID_TO_BANK_TRANSFER_FROM_MAIN, __FUNCTION__); + + if (destinationTownId < minTownIdToTransferFromMain && bankableTownId >= minTownIdToTransferFromMain) { + g_logger().warn("[{}] Player {} is from main town, trying to transfer money to player {} in {} town.", __FUNCTION__, bankablePlayer->getName(), destinationPlayer->getName(), destinationTownId); + return false; + } + + if (bankableTownId < minTownIdToTransferFromMain && destinationTownId >= minTownIdToTransferFromMain) { + g_logger().warn("[{}] Player {} is not from main town, trying to transfer money to player {} in {} town.", __FUNCTION__, bankablePlayer->getName(), destinationPlayer->getName(), destinationTownId); return false; } } @@ -122,8 +133,8 @@ bool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) g_metrics().addCounter("balance_increase", amount, { { "player", destinationPlayer->getName() }, { "context", "bank_transfer" } }); } - if (bankable->getPlayer()) { - g_metrics().addCounter("balance_decrease", amount, { { "player", bankable->getPlayer()->getName() }, { "context", "bank_transfer" } }); + if (bankablePlayer) { + g_metrics().addCounter("balance_decrease", amount, { { "player", bankablePlayer->getName() }, { "context", "bank_transfer" } }); } return true; diff --git a/src/game/bank/bank.hpp b/src/game/bank/bank.hpp index 9e65a55aeb9..7fdb740a022 100644 --- a/src/game/bank/bank.hpp +++ b/src/game/bank/bank.hpp @@ -42,7 +42,7 @@ class Bank : public SharedObject { bool balance(uint64_t amount) const; uint64_t balance(); bool hasBalance(uint64_t amount); - bool transferTo(const std::shared_ptr destination, uint64_t amount); + bool transferTo(const std::shared_ptr &destination, const uint64_t amount); bool withdraw(std::shared_ptr player, uint64_t amount); bool deposit(const std::shared_ptr destination); bool deposit(const std::shared_ptr destination, uint64_t amount); diff --git a/src/lua/functions/core/game/bank_functions.cpp b/src/lua/functions/core/game/bank_functions.cpp index cc76bf4c091..eb0bbf00280 100644 --- a/src/lua/functions/core/game/bank_functions.cpp +++ b/src/lua/functions/core/game/bank_functions.cpp @@ -57,37 +57,36 @@ int BankFunctions::luaBankHasBalance(lua_State* L) { int BankFunctions::luaBankTransfer(lua_State* L) { // Bank.transfer(fromPlayerOrGuild, toPlayerOrGuild, amount) - auto source = getBank(L, 1); + const auto &source = getBank(L, 1); if (source == nullptr) { g_logger().debug("BankFunctions::luaBankTransfer: source is null"); reportErrorFunc("Bank is nullptr"); return 1; } - std::shared_ptr destination = getBank(L, 2); + const auto &destination = getBank(L, 2); if (destination == nullptr) { g_logger().debug("BankFunctions::luaBankTransfer: destination is null"); reportErrorFunc("Bank is nullptr"); return 1; } - uint64_t amount = getNumber(L, 3); + const uint64_t amount = getNumber(L, 3); pushBoolean(L, source->transferTo(destination, amount)); return 1; } int BankFunctions::luaBankTransferToGuild(lua_State* L) { // Bank.transfer(fromPlayerOrGuild, toGuild, amount) - auto source = getBank(L, 1); + const auto &source = getBank(L, 1); if (source == nullptr) { reportErrorFunc("Source is nullptr"); return 1; } - - std::shared_ptr destination = getBank(L, 2, true /* isGuild */); + const auto &destination = getBank(L, 2, true /* isGuild */); if (destination == nullptr) { reportErrorFunc("Destination is nullptr"); return 1; } - uint64_t amount = getNumber(L, 3); + const uint64_t amount = getNumber(L, 3); pushBoolean(L, source->transferTo(destination, amount)); return 1; } From a44490191e15efec042764092690f6435aff4857 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Tue, 24 Sep 2024 17:48:34 -0300 Subject: [PATCH 05/29] fix: task context is being sent empty (#2871) Solve the problem where the message "[Task::Task] is sent: the task context cannot be empty!" because 'DispatcherContext::addEvent' and 'DispatcherContext::tryAddEvent' methods are not receiving the "context" parameter. --- src/canary_server.cpp | 2 +- src/creatures/combat/condition.cpp | 10 +- src/creatures/creature.cpp | 44 ++-- src/creatures/monsters/monster.cpp | 2 +- .../monsters/spawns/spawn_monster.cpp | 2 +- src/creatures/players/player.cpp | 14 +- src/database/databasetasks.cpp | 4 +- src/game/game.cpp | 219 +++++++++++------- src/game/scheduling/dispatcher.cpp | 8 +- src/game/scheduling/dispatcher.hpp | 6 +- .../functions/core/game/game_functions.cpp | 4 +- src/map/mapcache.cpp | 13 +- src/server/network/connection/connection.cpp | 4 +- src/server/network/protocol/protocol.cpp | 16 +- src/server/network/protocol/protocolgame.cpp | 26 ++- src/server/network/protocol/protocollogin.cpp | 10 +- .../network/protocol/protocolstatus.cpp | 20 +- src/server/signals.cpp | 10 +- 18 files changed, 247 insertions(+), 167 deletions(-) diff --git a/src/canary_server.cpp b/src/canary_server.cpp index cca280b69fa..f71fc71ba9a 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -123,7 +123,7 @@ int CanaryServer::run() { loaderStatus.notify_one(); }, - "CanaryServer::run" + __FUNCTION__ ); loaderStatus.wait(LoaderStatus::LOADING); diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp index 6784e8786f3..b308c05a5bc 100644 --- a/src/creatures/combat/condition.cpp +++ b/src/creatures/combat/condition.cpp @@ -2095,10 +2095,12 @@ bool ConditionFeared::executeCondition(std::shared_ptr creature, int32 } if (getFleePath(creature, currentPos, listDir)) { - g_dispatcher().addEvent([id = creature->getID(), listDir] { - g_game().forcePlayerAutoWalk(id, listDir); - }, - "ConditionFeared::executeCondition"); + g_dispatcher().addEvent( + [id = creature->getID(), listDir] { + g_game().forcePlayerAutoWalk(id, listDir); + }, + __FUNCTION__ + ); g_logger().debug("[ConditionFeared::executeCondition] Walking Scheduled"); } diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index a5cd66a629f..56ed1770039 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -251,17 +251,23 @@ void Creature::addEventWalk(bool firstStep) { return; } - g_dispatcher().context().tryAddEvent([ticks, self = getCreature()]() { - // Take first step right away, but still queue the next - if (ticks == 1) { - g_game().checkCreatureWalk(self->getID()); - } + g_dispatcher().context().tryAddEvent( + [ticks, self = getCreature()]() { + // Take first step right away, but still queue the next + if (ticks == 1) { + g_game().checkCreatureWalk(self->getID()); + } - self->eventWalk = g_dispatcher().scheduleEvent( - static_cast(ticks), - [creatureId = self->getID()] { g_game().checkCreatureWalk(creatureId); }, "Game::checkCreatureWalk" - ); - }); + self->eventWalk = g_dispatcher().scheduleEvent( + static_cast(ticks), + [creatureId = self->getID()] { + g_game().checkCreatureWalk(creatureId); + }, + "Game::checkCreatureWalk" + ); + }, + "Game::checkCreatureWalk" + ); } void Creature::stopEventWalk() { @@ -600,7 +606,7 @@ void Creature::onCreatureMove(const std::shared_ptr &creature, const s if (followCreature && (creature == getCreature() || creature == followCreature)) { if (hasFollowPath) { isUpdatingPath = true; - g_dispatcher().addEvent([creatureId = getID()] { g_game().updateCreatureWalk(creatureId); }, "Game::updateCreatureWalk"); + g_dispatcher().addEvent([creatureId = getID()] { g_game().updateCreatureWalk(creatureId); }, __FUNCTION__); } if (newPos.z != oldPos.z || !canSee(followCreature->getPosition())) { @@ -615,7 +621,7 @@ void Creature::onCreatureMove(const std::shared_ptr &creature, const s } else { if (hasExtraSwing()) { // our target is moving lets see if we can get in hit - g_dispatcher().addEvent([creatureId = getID()] { g_game().checkCreatureAttack(creatureId); }, "Game::checkCreatureAttack"); + g_dispatcher().addEvent([creatureId = getID()] { g_game().checkCreatureAttack(creatureId); }, __FUNCTION__); } if (newTile->getZoneType() != oldTile->getZoneType()) { @@ -825,10 +831,12 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared auto isReachable = g_game().map.getPathMatching(player->getPosition(), dirList, FrozenPathingConditionCall(corpse->getPosition()), fpp); if (player->checkAutoLoot(monster->isRewardBoss()) && isReachable) { - g_dispatcher().addEvent([player, corpseContainer, corpsePosition = corpse->getPosition()] { - g_game().playerQuickLootCorpse(player, corpseContainer, corpsePosition); - }, - "Game::playerQuickLootCorpse"); + g_dispatcher().addEvent( + [player, corpseContainer, corpsePosition = corpse->getPosition()] { + g_game().playerQuickLootCorpse(player, corpseContainer, corpsePosition); + }, + __FUNCTION__ + ); } } } @@ -872,7 +880,7 @@ void Creature::changeHealth(int32_t healthChange, bool sendHealthChange /* = tru g_game().addCreatureHealth(static_self_cast()); } if (health <= 0) { - g_dispatcher().addEvent([creatureId = getID()] { g_game().executeDeath(creatureId); }, "Game::executeDeath"); + g_dispatcher().addEvent([creatureId = getID()] { g_game().executeDeath(creatureId); }, __FUNCTION__); } } @@ -1061,7 +1069,7 @@ void Creature::goToFollowCreature_async(std::function &&onComplete) { }); if (onComplete) { - g_dispatcher().context().addEvent(std::move(onComplete)); + g_dispatcher().context().addEvent(std::move(onComplete), __FUNCTION__); } } diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 1a364ece2ba..4a6d07fe8d7 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -792,7 +792,7 @@ bool Monster::selectTarget(const std::shared_ptr &creature) { if (isHostile() || isSummon()) { if (setAttackedCreature(creature)) { - g_dispatcher().addEvent([creatureId = getID()] { g_game().checkCreatureAttack(creatureId); }, "Game::checkCreatureAttack"); + g_dispatcher().addEvent([creatureId = getID()] { g_game().checkCreatureAttack(creatureId); }, __FUNCTION__); } } return setFollowCreature(creature); diff --git a/src/creatures/monsters/spawns/spawn_monster.cpp b/src/creatures/monsters/spawns/spawn_monster.cpp index 846068e67b7..93b381da061 100644 --- a/src/creatures/monsters/spawns/spawn_monster.cpp +++ b/src/creatures/monsters/spawns/spawn_monster.cpp @@ -226,7 +226,7 @@ void SpawnMonster::startup(bool delayed) { continue; } if (delayed) { - g_dispatcher().addEvent([this, spawnMonsterId, &sb, mType] { scheduleSpawn(spawnMonsterId, sb, mType, 0, true); }, "SpawnMonster::startup"); + g_dispatcher().addEvent([this, spawnMonsterId, &sb, mType] { scheduleSpawn(spawnMonsterId, sb, mType, 0, true); }, __FUNCTION__); } else { scheduleSpawn(spawnMonsterId, sb, mType, 0, true); } diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 6f7e33eb7f9..8c49226b621 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -1946,7 +1946,7 @@ void Player::onCreatureMove(const std::shared_ptr &creature, const std const auto &followCreature = getFollowCreature(); if (hasFollowPath && (creature == followCreature || (creature.get() == this && followCreature))) { isUpdatingPath = false; - g_dispatcher().addEvent([creatureId = getID()] { g_game().updateCreatureWalk(creatureId); }, "Game::updateCreatureWalk"); + g_dispatcher().addEvent([creatureId = getID()] { g_game().updateCreatureWalk(creatureId); }, __FUNCTION__); } if (creature != getPlayer()) { @@ -4283,7 +4283,7 @@ bool Player::updateSaleShopList(std::shared_ptr item) { return true; } - g_dispatcher().addEvent([creatureId = getID()] { g_game().updatePlayerSaleItems(creatureId); }, "Game::updatePlayerSaleItems"); + g_dispatcher().addEvent([creatureId = getID()] { g_game().updatePlayerSaleItems(creatureId); }, __FUNCTION__); scheduledSaleUpdate = true; return true; } @@ -4354,7 +4354,7 @@ bool Player::setAttackedCreature(std::shared_ptr creature) { } if (creature) { - g_dispatcher().addEvent([creatureId = getID()] { g_game().checkCreatureAttack(creatureId); }, "Game::checkCreatureAttack"); + g_dispatcher().addEvent([creatureId = getID()] { g_game().checkCreatureAttack(creatureId); }, __FUNCTION__); } return true; } @@ -4416,7 +4416,8 @@ void Player::doAttacking(uint32_t) { const auto &task = createPlayerTask( std::max(SCHEDULER_MINTICKS, delay), - [playerId = getID()] { g_game().checkCreatureAttack(playerId); }, "Game::checkCreatureAttack" + [playerId = getID()] { g_game().checkCreatureAttack(playerId); }, + __FUNCTION__ ); if (!classicSpeed) { @@ -6785,7 +6786,7 @@ void Player::triggerTranscendance() { player->sendBasicData(); } }, - "Player::triggerTranscendance" + __FUNCTION__ ); g_dispatcher().scheduleEvent(task); @@ -7858,8 +7859,7 @@ bool Player::canAutoWalk(const Position &toPosition, const std::function std::vector listDir; if (getPathTo(toPosition, listDir, 0, 1, true, true)) { g_dispatcher().addEvent([creatureId = getID(), listDir] { g_game().playerAutoWalk(creatureId, listDir); }, __FUNCTION__); - - std::shared_ptr task = createPlayerTask(delay, function, __FUNCTION__); + const auto &task = createPlayerTask(delay, function, __FUNCTION__); setNextWalkActionTask(task); return true; } else { diff --git a/src/database/databasetasks.cpp b/src/database/databasetasks.cpp index 06cfda93fc0..8a660f1c031 100644 --- a/src/database/databasetasks.cpp +++ b/src/database/databasetasks.cpp @@ -26,7 +26,7 @@ void DatabaseTasks::execute(const std::string &query, std::functiongetID(), movingCreature->getID(), movingCreature->getPosition(), tile->getPosition()); }, - "Game::playerMoveCreatureByID" + __FUNCTION__ ); player->setNextActionPushTask(task); } else { @@ -1385,7 +1385,11 @@ void Game::playerMoveCreature(std::shared_ptr player, std::shared_ptrcanDoAction()) { const auto &task = createPlayerTask( - 600, [this, player, movingCreature, toTile, movingCreatureOrigPos] { playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()); }, "Game::playerMoveCreatureByID" + 600, + [this, player, movingCreature, toTile, movingCreatureOrigPos] { + playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()); + }, + __FUNCTION__ ); player->setNextActionPushTask(task); @@ -1398,9 +1402,13 @@ void Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr listDir; if (player->getPathTo(movingCreatureOrigPos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); const auto &task = createPlayerTask( - 600, [this, player, movingCreature, toTile, movingCreatureOrigPos] { playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()); }, "Game::playerMoveCreatureByID" + 600, + [this, player, movingCreature, toTile, movingCreatureOrigPos] { + playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()); + }, + __FUNCTION__ ); player->pushEvent(true); player->setNextActionPushTask(task); @@ -1601,11 +1609,12 @@ void Game::playerMoveItemByPlayerID(uint32_t playerId, const Position &fromPos, void 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) { if (!player->canDoAction()) { uint32_t delay = player->getNextActionTime(); - std::shared_ptr task = createPlayerTask( - delay, [this, playerId = player->getID(), fromPos, itemId, fromStackPos, toPos, count] { + const auto &task = createPlayerTask( + delay, + [this, playerId = player->getID(), fromPos, itemId, fromStackPos, toPos, count] { playerMoveItemByPlayerID(playerId, fromPos, itemId, fromStackPos, toPos, count); }, - "Game::playerMoveItemByPlayerID" + __FUNCTION__ ); player->setNextActionTask(task); return; @@ -1691,13 +1700,13 @@ void Game::playerMoveItem(std::shared_ptr player, const Position &fromPo // need to walk to the item first before using it std::vector listDir; if (player->getPathTo(item->getPosition(), listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId = player->getID(), fromPos, itemId, fromStackPos, toPos, count] { + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId = player->getID(), fromPos, itemId, fromStackPos, toPos, count] { playerMoveItemByPlayerID(playerId, fromPos, itemId, fromStackPos, toPos, count); }, - "Game::playerMoveItemByPlayerID" + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -1753,13 +1762,13 @@ void Game::playerMoveItem(std::shared_ptr player, const Position &fromPo std::vector listDir; if (player->getPathTo(walkPos, listDir, 0, 0, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId = player->getID(), itemPos, itemId, itemStackPos, toPos, count] { + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId = player->getID(), itemPos, itemId, itemStackPos, toPos, count] { playerMoveItemByPlayerID(playerId, itemPos, itemId, itemStackPos, toPos, count); }, - "Game::playerMoveItemByPlayerID" + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -3678,10 +3687,13 @@ void Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t f std::vector listDir; if (player->getPathTo(walkToPos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId] { playerUseItemEx(playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId); }, "Game::playerUseItemEx" + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId] { + playerUseItemEx(playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId); + }, + __FUNCTION__ ); if (it.isRune() || it.type == ITEM_TYPE_POTION) { player->setNextPotionActionTask(task); @@ -3708,8 +3720,12 @@ void Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t f if (it.isRune() || it.type == ITEM_TYPE_POTION) { delay = player->getNextPotionActionTime(); } - std::shared_ptr task = createPlayerTask( - delay, [this, playerId, fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId] { playerUseItemEx(playerId, fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId); }, "Game::playerUseItemEx" + const auto &task = createPlayerTask( + delay, + [this, playerId, fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId] { + playerUseItemEx(playerId, fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId); + }, + __FUNCTION__ ); if (it.isRune() || it.type == ITEM_TYPE_POTION) { player->setNextPotionActionTask(task); @@ -3792,10 +3808,13 @@ void Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPo if (ret == RETURNVALUE_TOOFARAWAY) { std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos, stackPos, index, itemId] { playerUseItem(playerId, pos, stackPos, index, itemId); }, "Game::playerUseItem" + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos, stackPos, index, itemId] { + playerUseItem(playerId, pos, stackPos, index, itemId); + }, + __FUNCTION__ ); if (it.isRune() || it.type == ITEM_TYPE_POTION) { player->setNextPotionActionTask(task); @@ -3822,8 +3841,12 @@ void Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPo if (it.isRune() || it.type == ITEM_TYPE_POTION) { delay = player->getNextPotionActionTime(); } - std::shared_ptr task = createPlayerTask( - delay, [this, playerId, pos, stackPos, index, itemId] { playerUseItem(playerId, pos, stackPos, index, itemId); }, "Game::playerUseItem" + const auto &task = createPlayerTask( + delay, + [this, playerId, pos, stackPos, index, itemId] { + playerUseItem(playerId, pos, stackPos, index, itemId); + }, + __FUNCTION__ ); if (it.isRune() || it.type == ITEM_TYPE_POTION) { player->setNextPotionActionTask(task); @@ -3949,13 +3972,13 @@ void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uin std::vector listDir; if (player->getPathTo(walkToPos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, itemPos, itemStackPos, creatureId, itemId] { + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, itemPos, itemStackPos, creatureId, itemId] { playerUseWithCreature(playerId, itemPos, itemStackPos, creatureId, itemId); }, - "Game::playerUseWithCreature" + __FUNCTION__ ); if (it.isRune() || it.type == ITEM_TYPE_POTION) { player->setNextPotionActionTask(task); @@ -3982,10 +4005,13 @@ void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uin if (it.isRune() || it.type == ITEM_TYPE_POTION) { delay = player->getNextPotionActionTime(); } - std::shared_ptr task = createPlayerTask( - delay, [this, playerId, fromPos, fromStackPos, creatureId, itemId] { playerUseWithCreature(playerId, fromPos, fromStackPos, creatureId, itemId); }, "Game::playerUseWithCreature" + const auto &task = createPlayerTask( + delay, + [this, playerId, fromPos, fromStackPos, creatureId, itemId] { + playerUseWithCreature(playerId, fromPos, fromStackPos, creatureId, itemId); + }, + __FUNCTION__ ); - if (it.isRune() || it.type == ITEM_TYPE_POTION) { player->setNextPotionActionTask(task); } else { @@ -4110,13 +4136,13 @@ void Game::playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stac if (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) { std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos, stackPos, itemId] { + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos, stackPos, itemId] { playerRotateItem(playerId, pos, stackPos, itemId); }, - "Game::playerRotateItem" + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -4166,18 +4192,26 @@ void Game::playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, if (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) { std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, false)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - std::shared_ptr task; + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); if (isPodiumOfRenown) { - task = createPlayerTask( - 400, [player, item, pos, itemId, stackPos] { player->sendPodiumWindow(item, pos, itemId, stackPos); }, "Game::playerConfigureShowOffSocket" + const auto &task = createPlayerTask( + 400, + [player, item, pos, itemId, stackPos] { + player->sendPodiumWindow(item, pos, itemId, stackPos); + }, + __FUNCTION__ ); + player->setNextWalkActionTask(task); } else { - task = createPlayerTask( - 400, [player, item, pos, itemId, stackPos] { player->sendMonsterPodiumWindow(item, pos, itemId, stackPos); }, "Game::playerConfigureShowOffSocket" + const auto &task = createPlayerTask( + 400, + [player, item, pos, itemId, stackPos] { + player->sendMonsterPodiumWindow(item, pos, itemId, stackPos); + }, + __FUNCTION__ ); + player->setNextWalkActionTask(task); } - player->setNextWalkActionTask(task); } else { player->sendCancelMessage(RETURNVALUE_THEREISNOWAY); } @@ -4227,9 +4261,13 @@ void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Pos if (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) { std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, false)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, "Game::playerBrowseField" + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos] { + playerBrowseField(playerId, pos); + }, + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -4368,10 +4406,13 @@ void Game::playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t st if (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) { std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos, stackPos, itemId] { playerWrapableItem(playerId, pos, stackPos, itemId); }, "Game::playerWrapableItem" + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos, stackPos, itemId] { + playerWrapableItem(playerId, pos, stackPos, itemId); + }, + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -4549,9 +4590,13 @@ void Game::playerBrowseField(uint32_t playerId, const Position &pos) { if (!Position::areInRange<1, 1>(playerPos, pos)) { std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, "Game::playerBrowseField" + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos] { + playerBrowseField(playerId, pos); + }, + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -4812,10 +4857,13 @@ void Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t st if (!Position::areInRange<1, 1>(tradeItemPosition, playerPosition)) { std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos, stackPos, tradePlayerId, itemId] { playerRequestTrade(playerId, pos, stackPos, tradePlayerId, itemId); }, "Game::playerRequestTrade" + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos, stackPos, tradePlayerId, itemId] { + playerRequestTrade(playerId, pos, stackPos, tradePlayerId, itemId); + }, + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -5375,12 +5423,13 @@ void Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t item } if (!autoLoot && !player->canDoAction()) { - uint32_t delay = player->getNextActionTime(); - std::shared_ptr task = createPlayerTask( - delay, [this, playerId = player->getID(), pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot] { + const uint32_t delay = player->getNextActionTime(); + const auto &task = createPlayerTask( + delay, + [this, playerId = player->getID(), pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot] { playerQuickLoot(playerId, pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot); }, - "Game::playerQuickLoot" + __FUNCTION__ ); player->setNextActionTask(task); return; @@ -5391,12 +5440,13 @@ void Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t item // need to walk to the corpse first before looting it std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - std::shared_ptr task = createPlayerTask( - 0, [this, playerId = player->getID(), pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot] { + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 300, + [this, playerId = player->getID(), pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot] { playerQuickLoot(playerId, pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot); }, - "Game::playerQuickLoot" + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -5765,7 +5815,7 @@ void Game::playerSetAttackedCreature(uint32_t playerId, uint32_t creatureId) { } player->setAttackedCreature(attackCreature); - g_dispatcher().addEvent([this, plyerId = player->getID()] { updateCreatureWalk(plyerId); }, "Game::updateCreatureWalk"); + g_dispatcher().addEvent([this, plyerId = player->getID()] { updateCreatureWalk(plyerId); }, __FUNCTION__); } void Game::playerFollowCreature(uint32_t playerId, uint32_t creatureId) { @@ -5775,7 +5825,7 @@ void Game::playerFollowCreature(uint32_t playerId, uint32_t creatureId) { } player->setAttackedCreature(nullptr); - g_dispatcher().addEvent([this, plyerId = player->getID()] { updateCreatureWalk(plyerId); }, "Game::updateCreatureWalk"); + g_dispatcher().addEvent([this, plyerId = player->getID()] { updateCreatureWalk(plyerId); }, __FUNCTION__); player->setFollowCreature(getCreatureByID(creatureId)); } @@ -9483,9 +9533,13 @@ void Game::playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, con if (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) { if (std::vector listDir; player->getPathTo(pos, listDir, 0, 1, true, false)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, "Game::playerBrowseField" + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos] { + playerBrowseField(playerId, pos); + }, + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -9583,12 +9637,13 @@ void Game::playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t st if (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) { if (std::vector listDir; player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); - std::shared_ptr task = createPlayerTask( - 400, [this, playerId, pos, stackPos, itemId] { + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, __FUNCTION__); + const auto &task = createPlayerTask( + 400, + [this, playerId, pos, stackPos, itemId] { playerRotatePodium(playerId, pos, stackPos, itemId); }, - "Game::playerRotatePodium" + __FUNCTION__ ); player->setNextWalkActionTask(task); } else { @@ -10107,7 +10162,7 @@ uint32_t Game::makeFiendishMonster(uint32_t forgeableMonsterId /* = 0*/, bool cr auto schedulerTask = createPlayerTask( finalTime, [this, monster] { updateFiendishMonsterStatus(monster->getID(), monster->getName()); }, - "Game::updateFiendishMonsterStatus" + __FUNCTION__ ); forgeMonsterEventIds[monster->getID()] = g_dispatcher().scheduleEvent(schedulerTask); return monster->getID(); diff --git a/src/game/scheduling/dispatcher.cpp b/src/game/scheduling/dispatcher.cpp index dbbfc020be5..eaedaa86ac5 100644 --- a/src/game/scheduling/dispatcher.cpp +++ b/src/game/scheduling/dispatcher.cpp @@ -236,17 +236,17 @@ void Dispatcher::stopEvent(uint64_t eventId) { } } -void DispatcherContext::addEvent(std::function &&f) const { - g_dispatcher().addEvent(std::move(f), taskName); +void DispatcherContext::addEvent(std::function &&f, std::string_view context) const { + g_dispatcher().addEvent(std::move(f), context); } -void DispatcherContext::tryAddEvent(std::function &&f) const { +void DispatcherContext::tryAddEvent(std::function &&f, std::string_view context) const { if (!f) { return; } if (isAsync()) { - g_dispatcher().addEvent(std::move(f), taskName); + g_dispatcher().addEvent(std::move(f), context); } else { f(); } diff --git a/src/game/scheduling/dispatcher.hpp b/src/game/scheduling/dispatcher.hpp index 94b284c9316..b50346e4895 100644 --- a/src/game/scheduling/dispatcher.hpp +++ b/src/game/scheduling/dispatcher.hpp @@ -56,10 +56,10 @@ struct DispatcherContext { } // postpone the event - void addEvent(std::function &&f) const; + void addEvent(std::function &&f, std::string_view context) const; // if the context is async, the event will be postponed, if not, it will be executed immediately. - void tryAddEvent(std::function &&f) const; + void tryAddEvent(std::function &&f, std::string_view context) const; private: void reset() { @@ -70,7 +70,7 @@ struct DispatcherContext { DispatcherType type = DispatcherType::None; TaskGroup group = TaskGroup::ThreadPool; - std::string_view taskName = ""; + std::string_view taskName; friend class Dispatcher; }; diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index 10a6379781a..83544ded535 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -180,7 +180,7 @@ int GameFunctions::luaGameGetPlayers(lua_State* L) { int GameFunctions::luaGameLoadMap(lua_State* L) { // Game.loadMap(path) const std::string &path = getString(L, 1); - g_dispatcher().addEvent([path]() { g_game().loadMap(path); }, "GameFunctions::luaGameLoadMap"); + g_dispatcher().addEvent([path]() { g_game().loadMap(path); }, __FUNCTION__); return 0; } @@ -188,7 +188,7 @@ int GameFunctions::luaGameloadMapChunk(lua_State* L) { // Game.loadMapChunk(path, position, remove) const std::string &path = getString(L, 1); const Position &position = getPosition(L, 2); - g_dispatcher().addEvent([path, position]() { g_game().loadMap(path, position); }, "GameFunctions::luaGameloadMapChunk"); + g_dispatcher().addEvent([path, position]() { g_game().loadMap(path, position); }, __FUNCTION__); return 0; } diff --git a/src/map/mapcache.cpp b/src/map/mapcache.cpp index f4cdb524ec9..ad3c909a8bf 100644 --- a/src/map/mapcache.cpp +++ b/src/map/mapcache.cpp @@ -152,11 +152,14 @@ std::shared_ptr MapCache::getOrCreateTileFromCache(const std::unique_ptrsetFlag(static_cast(cachedTile->flags)); // add zone synchronously - g_dispatcher().context().tryAddEvent([tile, pos] { - for (const auto &zone : Zone::getZones(pos)) { - tile->addZone(zone); - } - }); + g_dispatcher().context().tryAddEvent( + [tile, pos] { + for (const auto &zone : Zone::getZones(pos)) { + tile->addZone(zone); + } + }, + "Zone::getZones" + ); floor->setTile(x, y, tile); diff --git a/src/server/network/connection/connection.cpp b/src/server/network/connection/connection.cpp index 3072384420d..a3782d56cba 100644 --- a/src/server/network/connection/connection.cpp +++ b/src/server/network/connection/connection.cpp @@ -62,7 +62,7 @@ void Connection::close(bool force) { connectionState = CONNECTION_STATE_CLOSED; if (protocol) { - g_dispatcher().addEvent([protocol = protocol] { protocol->release(); }, "Protocol::release", std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count()); + g_dispatcher().addEvent([protocol = protocol] { protocol->release(); }, __FUNCTION__, std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count()); } if (messageQueue.empty() || force) { @@ -98,7 +98,7 @@ void Connection::closeSocket() { void Connection::accept(Protocol_ptr protocolPtr) { connectionState = CONNECTION_STATE_IDENTIFYING; protocol = std::move(protocolPtr); - g_dispatcher().addEvent([protocol = protocol] { protocol->onConnect(); }, "Protocol::onConnect", std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count()); + g_dispatcher().addEvent([protocol = protocol] { protocol->onConnect(); }, __FUNCTION__, std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count()); acceptInternal(false); } diff --git a/src/server/network/protocol/protocol.cpp b/src/server/network/protocol/protocol.cpp index 255899f2f99..c40ead17ab0 100644 --- a/src/server/network/protocol/protocol.cpp +++ b/src/server/network/protocol/protocol.cpp @@ -44,13 +44,17 @@ bool Protocol::sendRecvMessageCallback(NetworkMessage &msg) { return false; } - g_dispatcher().addEvent([&msg, protocolWeak = std::weak_ptr(shared_from_this())]() { - if (auto protocol = protocolWeak.lock()) { - if (auto protocolConnection = protocol->getConnection()) { - protocol->parsePacket(msg); - protocolConnection->resumeWork(); + g_dispatcher().addEvent( + [&msg, protocolWeak = std::weak_ptr(shared_from_this())]() { + if (auto protocol = protocolWeak.lock()) { + if (auto protocolConnection = protocol->getConnection()) { + protocol->parsePacket(msg); + protocolConnection->resumeWork(); + } } - } }, "Protocol::sendRecvMessageCallback"); + }, + __FUNCTION__ + ); return true; } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index aab3f88bd47..909eef1e92e 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -859,7 +859,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { return; } - g_dispatcher().addEvent([self = getThis(), characterName, accountId, operatingSystem] { self->login(characterName, accountId, operatingSystem); }, "ProtocolGame::login"); + g_dispatcher().addEvent([self = getThis(), characterName, accountId, operatingSystem] { self->login(characterName, accountId, operatingSystem); }, __FUNCTION__); } void ProtocolGame::onConnect() { @@ -5040,18 +5040,20 @@ void ProtocolGame::updateCoinBalance() { return; } - g_dispatcher().addEvent([playerId = player->getID()] { - const auto &threadPlayer = g_game().getPlayerByID(playerId); - if (threadPlayer && threadPlayer->getAccount()) { - const auto [coins, errCoin] = threadPlayer->getAccount()->getCoins(enumToValue(CoinType::Normal)); - const auto [transferCoins, errTCoin] = threadPlayer->getAccount()->getCoins(enumToValue(CoinType::Transferable)); + g_dispatcher().addEvent( + [playerId = player->getID()] { + const auto &threadPlayer = g_game().getPlayerByID(playerId); + if (threadPlayer && threadPlayer->getAccount()) { + const auto [coins, errCoin] = threadPlayer->getAccount()->getCoins(enumToValue(CoinType::Normal)); + const auto [transferCoins, errTCoin] = threadPlayer->getAccount()->getCoins(enumToValue(CoinType::Transferable)); - threadPlayer->coinBalance = coins; - threadPlayer->coinTransferableBalance = transferCoins; - threadPlayer->sendCoinBalance(); - } - }, - "ProtocolGame::updateCoinBalance"); + threadPlayer->coinBalance = coins; + threadPlayer->coinTransferableBalance = transferCoins; + threadPlayer->sendCoinBalance(); + } + }, + __FUNCTION__ + ); } void ProtocolGame::sendMarketLeave() { diff --git a/src/server/network/protocol/protocollogin.cpp b/src/server/network/protocol/protocollogin.cpp index d6e9e3cb9f1..f8c68634f64 100644 --- a/src/server/network/protocol/protocollogin.cpp +++ b/src/server/network/protocol/protocollogin.cpp @@ -174,8 +174,10 @@ void ProtocolLogin::onRecvFirstMessage(NetworkMessage &msg) { return; } - g_dispatcher().addEvent([self = std::static_pointer_cast(shared_from_this()), accountDescriptor, password] { - self->getCharacterList(accountDescriptor, password); - }, - "ProtocolLogin::getCharacterList"); + g_dispatcher().addEvent( + [self = std::static_pointer_cast(shared_from_this()), accountDescriptor, password] { + self->getCharacterList(accountDescriptor, password); + }, + __FUNCTION__ + ); } diff --git a/src/server/network/protocol/protocolstatus.cpp b/src/server/network/protocol/protocolstatus.cpp index 15a3f74be07..f9ec878eda9 100644 --- a/src/server/network/protocol/protocolstatus.cpp +++ b/src/server/network/protocol/protocolstatus.cpp @@ -44,10 +44,12 @@ void ProtocolStatus::onRecvFirstMessage(NetworkMessage &msg) { // XML info protocol case 0xFF: { if (msg.getString(4) == "info") { - g_dispatcher().addEvent([self = std::static_pointer_cast(shared_from_this())] { - self->sendStatusString(); - }, - "ProtocolStatus::sendStatusString"); + g_dispatcher().addEvent( + [self = std::static_pointer_cast(shared_from_this())] { + self->sendStatusString(); + }, + __FUNCTION__ + ); return; } break; @@ -60,10 +62,12 @@ void ProtocolStatus::onRecvFirstMessage(NetworkMessage &msg) { if (requestedInfo & REQUEST_PLAYER_STATUS_INFO) { characterName = msg.getString(); } - g_dispatcher().addEvent([self = std::static_pointer_cast(shared_from_this()), requestedInfo, characterName] { - self->sendInfo(requestedInfo, characterName); - }, - "ProtocolStatus::sendInfo"); + g_dispatcher().addEvent( + [self = std::static_pointer_cast(shared_from_this()), requestedInfo, characterName] { + self->sendInfo(requestedInfo, characterName); + }, + __FUNCTION__ + ); return; } diff --git a/src/server/signals.cpp b/src/server/signals.cpp index 626a918f677..ae71d833c93 100644 --- a/src/server/signals.cpp +++ b/src/server/signals.cpp @@ -54,21 +54,21 @@ void Signals::asyncWait() { void Signals::dispatchSignalHandler(int signal) { switch (signal) { case SIGINT: // Shuts the server down - g_dispatcher().addEvent(sigintHandler, "sigintHandler"); + g_dispatcher().addEvent(sigintHandler, __FUNCTION__); break; case SIGTERM: // Shuts the server down - g_dispatcher().addEvent(sigtermHandler, "sigtermHandler"); + g_dispatcher().addEvent(sigtermHandler, __FUNCTION__); break; #ifndef _WIN32 case SIGHUP: // Reload config/data - g_dispatcher().addEvent(sighupHandler, "sighupHandler"); + g_dispatcher().addEvent(sighupHandler, __FUNCTION__); break; case SIGUSR1: // Saves game state - g_dispatcher().addEvent(sigusr1Handler, "sigusr1Handler"); + g_dispatcher().addEvent(sigusr1Handler, __FUNCTION__); break; #else case SIGBREAK: // Shuts the server down - g_dispatcher().addEvent(sigbreakHandler, "sigbreakHandler"); + g_dispatcher().addEvent(sigbreakHandler, __FUNCTION__); // hold the thread until other threads end inject().shutdown(); break; From 15180dcf78b00674ba1b6f3e9df57a7c51b0caed Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Tue, 24 Sep 2024 17:51:36 -0300 Subject: [PATCH 06/29] fix: disable irrelevant informations (#2910) The "PlayerBadge" was loading a lot of unnecessary information for all players on the account. I moved the if statement up, ensuring that only the preload and level are properly loaded, which are actually relevant information. If more information is identified that should be loaded in the preload, we should move it to the loadPlayerFirst function. --- src/game/game.cpp | 2 +- src/io/iologindata.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index a44b75d285c..3a579ec2fdf 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -988,7 +988,7 @@ std::shared_ptr Game::getPlayerByName(const std::string &s, bool allowOf return nullptr; } std::shared_ptr tmpPlayer = std::make_shared(nullptr); - if (!IOLoginData::loadPlayerByName(tmpPlayer, s)) { + if (!IOLoginData::loadPlayerByName(tmpPlayer, s, allowOffline)) { if (!isNewName) { g_logger().error("Failed to load player {} from database", s); } else { diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index fce5d0dc293..41f8cea8985 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -123,6 +123,10 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result // Experience load IOLoginDataLoad::loadPlayerExperience(player, result); + if (disableIrrelevantInfo) { + return true; + } + // Blessings load IOLoginDataLoad::loadPlayerBlessings(player, result); @@ -180,10 +184,6 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result // Load instant spells list IOLoginDataLoad::loadPlayerInstantSpellList(player, result); - if (disableIrrelevantInfo) { - return true; - } - // load forge history IOLoginDataLoad::loadPlayerForgeHistory(player, result); From 4bc7a5c9c095b01a14be3d1edff088cbf98ef741 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Tue, 24 Sep 2024 18:03:05 -0300 Subject: [PATCH 07/29] fix: CPU overload when loading many nested containers (#2909) This addresses an issue where excessive CPU load occurs when dealing with deeply nested containers due to repeated calls to the `isRemoved` function in the `canDecay` method. To mitigate this, the order of checks in `canDecay` has been changed to evaluate the decay conditions first, and only check for removal status (`isRemoved`) as the last step. --- src/items/item.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/items/item.cpp b/src/items/item.cpp index dd2d5c965a6..2ad0cfa4abd 100644 --- a/src/items/item.cpp +++ b/src/items/item.cpp @@ -3160,16 +3160,17 @@ void Item::addUniqueId(uint16_t uniqueId) { } bool Item::canDecay() { - if (isRemoved() || isDecayDisabled()) { + const ItemType &it = Item::items[id]; + if (it.decayTo < 0 || it.decayTime == 0 || isDecayDisabled()) { return false; } - const ItemType &it = Item::items[id]; - if (it.decayTo < 0 || it.decayTime == 0) { + if (hasAttribute(ItemAttribute_t::UNIQUEID)) { return false; } - if (hasAttribute(ItemAttribute_t::UNIQUEID)) { + // In certain conditions, such as depth nested containers, this can overload the CPU, so it is left last. + if (isRemoved()) { return false; } From 11bd3a689c69d163491dc8667cc2ec29b49fd293 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Tue, 24 Sep 2024 21:37:48 -0300 Subject: [PATCH 08/29] fix: forge correct slots (#2850) Resolves #2718 --- src/server/network/protocol/protocolgame.cpp | 40 ++++++++++++++------ 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 909eef1e92e..7ae02e31b10 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -5370,7 +5370,8 @@ void ProtocolGame::sendForgingData() { void ProtocolGame::sendOpenForge() { // We will use it when sending the bytes to send the item information to the client std::map> fusionItemsMap; - std::map>> convergenceItemsMap; + std::map>> convergenceFusionItemsMap; + std::map>> convergenceTransferItemsMap; std::map> donorTierItemMap; std::map> receiveTierItemMap; @@ -5405,7 +5406,12 @@ void ProtocolGame::sendOpenForge() { getForgeInfoMap(item, receiveTierItemMap); } if (itemClassification == 4) { - getForgeInfoMap(item, convergenceItemsMap[item->getClassification()]); + auto slotPosition = item->getSlotPosition(); + if ((slotPosition & SLOTP_TWO_HAND) != 0) { + slotPosition = SLOTP_HAND; + } + getForgeInfoMap(item, convergenceFusionItemsMap[slotPosition]); + getForgeInfoMap(item, convergenceTransferItemsMap[item->getClassification()]); } } } @@ -5413,7 +5419,7 @@ void ProtocolGame::sendOpenForge() { // Checking size of map to send in the addByte (total fusion items count) uint8_t fusionTotalItemsCount = 0; for (const auto &[itemId, tierAndCountMap] : fusionItemsMap) { - for (const auto [itemTier, itemCount] : tierAndCountMap) { + for (const auto &[itemTier, itemCount] : tierAndCountMap) { if (itemCount >= 2) { fusionTotalItemsCount++; } @@ -5430,7 +5436,7 @@ void ProtocolGame::sendOpenForge() { msg.add(fusionTotalItemsCount); for (const auto &[itemId, tierAndCountMap] : fusionItemsMap) { - for (const auto [itemTier, itemCount] : tierAndCountMap) { + for (const auto &[itemTier, itemCount] : tierAndCountMap) { if (itemCount >= 2) { msg.addByte(0x01); // Number of friend items? msg.add(itemId); @@ -5452,12 +5458,12 @@ void ProtocolGame::sendOpenForge() { 1 byte: tier 2 bytes: count */ - for (const auto &[slot, itemMap] : convergenceItemsMap) { + for (const auto &[slot, itemMap] : convergenceFusionItemsMap) { uint8_t totalItemsCount = 0; auto totalItemsCountPosition = msg.getBufferPosition(); msg.skipBytes(1); // Total items count for (const auto &[itemId, tierAndCountMap] : itemMap) { - for (const auto [tier, itemCount] : tierAndCountMap) { + for (const auto &[tier, itemCount] : tierAndCountMap) { if (tier >= maxConfigTier) { continue; } @@ -5488,11 +5494,15 @@ void ProtocolGame::sendOpenForge() { // Let's access the itemType to check the item's (donator of tier) classification level // Must be the same as the item that will receive the tier const ItemType &donorType = Item::items[itemId]; + auto donorSlotPosition = donorType.slotPosition; + if ((donorSlotPosition & SLOTP_TWO_HAND) != 0) { + donorSlotPosition = SLOTP_HAND; + } // Total count of item (donator of tier) auto donorTierTotalItemsCount = getIterationIncreaseCount(tierAndCountMap); msg.add(donorTierTotalItemsCount); - for (const auto [donorItemTier, donorItemCount] : tierAndCountMap) { + for (const auto &[donorItemTier, donorItemCount] : tierAndCountMap) { msg.add(itemId); msg.addByte(donorItemTier); msg.add(donorItemCount); @@ -5502,7 +5512,11 @@ void ProtocolGame::sendOpenForge() { for (const auto &[iteratorItemId, unusedTierAndCountMap] : receiveTierItemMap) { // Let's access the itemType to check the item's (receiver of tier) classification level const ItemType &receiveType = Item::items[iteratorItemId]; - if (donorType.upgradeClassification == receiveType.upgradeClassification) { + auto receiveSlotPosition = receiveType.slotPosition; + if ((receiveSlotPosition & SLOTP_TWO_HAND) != 0) { + receiveSlotPosition = SLOTP_HAND; + } + if (donorType.upgradeClassification == receiveType.upgradeClassification && donorSlotPosition == receiveSlotPosition) { receiveTierTotalItemCount++; } } @@ -5513,8 +5527,12 @@ void ProtocolGame::sendOpenForge() { for (const auto &[receiveItemId, receiveTierAndCountMap] : receiveTierItemMap) { // Let's access the itemType to check the item's (receiver of tier) classification level const ItemType &receiveType = Item::items[receiveItemId]; - if (donorType.upgradeClassification == receiveType.upgradeClassification) { - for (const auto [receiveItemTier, receiveItemCount] : receiveTierAndCountMap) { + auto receiveSlotPosition = receiveType.slotPosition; + if ((receiveSlotPosition & SLOTP_TWO_HAND) != 0) { + receiveSlotPosition = SLOTP_HAND; + } + if (donorType.upgradeClassification == receiveType.upgradeClassification && donorSlotPosition == receiveSlotPosition) { + for (const auto &[receiveItemTier, receiveItemCount] : receiveTierAndCountMap) { msg.add(receiveItemId); msg.add(receiveItemCount); } @@ -5540,7 +5558,7 @@ void ProtocolGame::sendOpenForge() { 2 bytes: item id 2 bytes: count */ - for (const auto &[slot, itemMap] : convergenceItemsMap) { + for (const auto &[slot, itemMap] : convergenceTransferItemsMap) { uint16_t donorCount = 0; uint16_t receiverCount = 0; auto donorCountPosition = msg.getBufferPosition(); From edeff040b4f058e66c1eb91100ad64da65ecf424 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Fri, 27 Sep 2024 23:46:00 -0300 Subject: [PATCH 09/29] fix: convergence wrong price calculation (#2918) Resolves #2523 --- src/creatures/players/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 8c49226b621..f9fafee1f14 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -7213,7 +7213,7 @@ void Player::forgeFuseItems(ForgeAction_t actionType, uint16_t firstItemId, uint } for (const auto &[mapTier, mapPrice] : itemClassification->tiers) { - if (mapTier == firstForgingItem->getTier()) { + if (mapTier == firstForgingItem->getTier() + 1) { cost = mapPrice.convergenceFusionPrice; break; } From 09c16ff620b2cd9cfd5a25af97f493aa2c8ad9bf Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Fri, 27 Sep 2024 23:47:15 -0300 Subject: [PATCH 10/29] fix: can't sell containers with items inside (#2911) # Description It will not be possible to sell backpacks that contain items inside. --- src/creatures/npcs/npc.cpp | 7 +++++++ src/creatures/players/player.cpp | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/src/creatures/npcs/npc.cpp b/src/creatures/npcs/npc.cpp index 6d38524aef3..05f22780ada 100644 --- a/src/creatures/npcs/npc.cpp +++ b/src/creatures/npcs/npc.cpp @@ -387,6 +387,13 @@ void Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint continue; } + if (const auto &container = item->getContainer()) { + if (container->size() > 0) { + player->sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must empty the container before selling it."); + continue; + } + } + if (parent && item->getParent() != parent) { continue; } diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index f9fafee1f14..b923dd952d2 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -4120,6 +4120,12 @@ std::map &Player::getAllItemTypeCount(std::map &Player::getAllSaleItemIdAndCount(std::map &countMap) const { for (const auto &item : getAllInventoryItems(false, true)) { + if (const auto &container = item->getContainer()) { + if (container->size() > 0) { + continue; + } + } + countMap[item->getID()] += item->getItemCount(); } From 04fa24813d097bd48d0d1b84377526596972ec7a Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sat, 28 Sep 2024 22:45:51 -0300 Subject: [PATCH 11/29] refactor: replace C-style array with std::array for buffer management (#2914) Refactored buffer management by replacing C-style arrays with std::array in the NetworkMessage and OutputMessage classes. This change enhances memory safety by providing compile-time size checks and prevents buffer overflows through safer access methods. Transitioned all instances of memcpy to std::ranges::copy and replaced memset with std::fill for improved readability and type safety. Removed the use of reinterpret_cast for safer type conversions. Introduced enhanced logging using std::source_location and added an optional function parameter to the addString and getString functions, providing better contextual information for both C++ and Lua scripts. Fixed a bug in the decodeHeader function and added corresponding unit tests to validate the fix. This update addresses potential buffer overflow issues, improves code clarity, and enhances debugging capabilities. It also includes integration tests to ensure the correct behavior of buffer management under various conditions, such as large message handling and stress testing. The changes aim to modernize the codebase, reduce manual memory management risks, and align the implementation with modern C++ best practices. --- .../monsters/spawns/spawn_monster.hpp | 14 +- src/creatures/players/player.cpp | 2 +- .../network/network_message_functions.cpp | 2 +- src/map/utils/astarnodes.cpp | 22 +- src/pch.hpp | 2 + src/server/network/message/networkmessage.cpp | 249 +++++++++++- src/server/network/message/networkmessage.hpp | 150 ++++---- src/server/network/message/outputmessage.hpp | 24 +- src/server/network/protocol/protocolgame.cpp | 358 +++++++++--------- src/server/network/protocol/protocolgame.hpp | 2 +- src/server/network/protocol/protocollogin.cpp | 12 +- .../network/protocol/protocolstatus.cpp | 28 +- src/utils/const.hpp | 2 + tests/build_and_run.sh | 12 +- tests/unit/CMakeLists.txt | 1 + tests/unit/server/CMakeLists.txt | 3 + .../network/message/networkmessage_test.cpp | 144 +++++++ 17 files changed, 698 insertions(+), 329 deletions(-) create mode 100644 tests/unit/server/CMakeLists.txt create mode 100644 tests/unit/server/network/message/networkmessage_test.cpp diff --git a/src/creatures/monsters/spawns/spawn_monster.hpp b/src/creatures/monsters/spawns/spawn_monster.hpp index 81a08973cb7..caf454c41b5 100644 --- a/src/creatures/monsters/spawns/spawn_monster.hpp +++ b/src/creatures/monsters/spawns/spawn_monster.hpp @@ -38,9 +38,12 @@ class SpawnMonster { // moveable SpawnMonster(SpawnMonster &&rhs) noexcept : - spawnMonsterMap(std::move(rhs.spawnMonsterMap)), spawnedMonsterMap(std::move(rhs.spawnedMonsterMap)), - checkSpawnMonsterEvent(rhs.checkSpawnMonsterEvent), centerPos(rhs.centerPos), radius(rhs.radius), interval(rhs.interval) { } + spawnMonsterMap(std::move(rhs.spawnMonsterMap)), + centerPos(rhs.centerPos), + radius(rhs.radius), + interval(rhs.interval), + checkSpawnMonsterEvent(rhs.checkSpawnMonsterEvent) { } SpawnMonster &operator=(SpawnMonster &&rhs) noexcept { if (this != &rhs) { @@ -77,15 +80,12 @@ class SpawnMonster { void setMonsterVariant(const std::string &variant); private: - // map of the spawned creatures + // The map of the spawned creatures std::map> spawnedMonsterMap; - - // map of creatures in the spawn + // The map of creatures in the spawn std::map spawnMonsterMap; - Position centerPos; int32_t radius; - uint32_t interval = 30000; uint32_t checkSpawnMonsterEvent = 0; diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index b923dd952d2..e3790583eff 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -5575,7 +5575,7 @@ int32_t Player::getMagicShieldCapacityPercent(bool useCharges) const { double_t Player::getReflectPercent(CombatType_t combat, bool useCharges) const { double_t result = reflectPercent[combatTypeToIndex(combat)]; - for (const auto item : getEquippedItems()) { + for (const auto &item : getEquippedItems()) { const ItemType &itemType = Item::items[item->getID()]; if (!itemType.abilities) { continue; diff --git a/src/lua/functions/core/network/network_message_functions.cpp b/src/lua/functions/core/network/network_message_functions.cpp index a1b66264fac..e2f4013448d 100644 --- a/src/lua/functions/core/network/network_message_functions.cpp +++ b/src/lua/functions/core/network/network_message_functions.cpp @@ -196,7 +196,7 @@ int NetworkMessageFunctions::luaNetworkMessageAddString(lua_State* L) { const std::string &function = getString(L, 3); const auto &message = getUserdataShared(L, 1); if (message) { - message->addString(string, function); + message->addString(string, std::source_location::current(), function); pushBoolean(L, true); } else { lua_pushnil(L); diff --git a/src/map/utils/astarnodes.cpp b/src/map/utils/astarnodes.cpp index 21ebe5f982f..e7c5b7ce48e 100644 --- a/src/map/utils/astarnodes.cpp +++ b/src/map/utils/astarnodes.cpp @@ -14,7 +14,21 @@ #include "creatures/combat/combat.hpp" AStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) : - openNodes(), nodes() { +#if defined(__AVX2__) || defined(__SSE2__) + nodesTable(), // 1. nodesTable + calculatedNodes(), // 2. calculatedNodes + nodes(), // 3. nodes + closedNodes(0), // 4. closedNodes + curNode(0), // 5. curNode + openNodes() // 6. openNodes +#else + nodes(), // 1. nodes + nodesTable(), // 2. nodesTable + closedNodes(0), // 3. closedNodes + curNode(0), // 4. curNode + openNodes() // 5. openNodes +#endif +{ #if defined(__AVX2__) __m256i defaultCost = _mm256_set1_epi32(std::numeric_limits::max()); for (int32_t i = 0; i < MAX_NODES; i += 32) { @@ -47,7 +61,7 @@ AStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) : startNode.g = 0; startNode.c = extraCost; nodesTable[0] = (x << 16) | y; -#if defined(__SSE2__) +#if defined(__SSE2__) || defined(__AVX2__) calculatedNodes[0] = 0; #endif } @@ -265,9 +279,9 @@ int_fast32_t AStarNodes::getMapWalkCost(AStarNode* node, const Position &neighbo int_fast32_t AStarNodes::getTileWalkCost(const std::shared_ptr &creature, const std::shared_ptr &tile) { int_fast32_t cost = 0; - if (creature) { + if (creature && tile) { + // Destroy creature cost if (tile->getTopVisibleCreature(creature) != nullptr) { - // destroy creature cost cost += MAP_NORMALWALKCOST * 4; } if (const auto &field = tile->getFieldItem()) { diff --git a/src/pch.hpp b/src/pch.hpp index e69c27016a4..ea3c9cd2e73 100644 --- a/src/pch.hpp +++ b/src/pch.hpp @@ -46,6 +46,8 @@ #include #include #include +#include +#include // -------------------- // System Includes diff --git a/src/server/network/message/networkmessage.cpp b/src/server/network/message/networkmessage.cpp index 38acc0b484c..d8cb599a07c 100644 --- a/src/server/network/message/networkmessage.cpp +++ b/src/server/network/message/networkmessage.cpp @@ -13,23 +13,101 @@ #include "items/containers/container.hpp" int32_t NetworkMessage::decodeHeader() { - int32_t newSize = buffer[0] | buffer[1] << 8; - info.length = newSize; - return info.length; + // Ensure there are enough bytes to read the header (2 bytes) + if (!canRead(2)) { + g_logger().error("[{}] Not enough data to decode header. Current position: {}, Length: {}", __FUNCTION__, info.position, info.length); + return {}; + } + + // Log the current position and buffer content before decoding + g_logger().debug("[{}] Decoding header at position: {}", __FUNCTION__, info.position); + g_logger().debug("[{}] Buffer content: ", __FUNCTION__); + + // Log only up to 10 bytes of the buffer or until the end of the buffer + for (size_t i = 0; i < 10 && i < buffer.size(); ++i) { + g_logger().debug("[{}] Buffer[{}]: {}", __FUNCTION__, i, buffer[i]); + } + + // Check if there are enough bytes in the buffer for the header + if (info.position + 1 < buffer.size()) { + // Create a span view for safety + std::span bufferSpan(buffer.data(), buffer.size()); + auto decodedHeader = bufferSpan[info.position] | (bufferSpan[info.position + 1] << 8); + // Update position after reading the header + info.position += sizeof(decodedHeader); + return decodedHeader; + } else { + g_logger().warn("Index out of bounds when trying to access buffer with position: {}", info.position); + } + + // Handle buffer overflow error here + g_logger().error("[{}] attempted to read beyond buffer limits at position: {}", __FUNCTION__, info.position); + return {}; +} + +// Simply read functions for incoming message +uint8_t NetworkMessage::getByte() { + // Check if there is at least 1 byte to read + if (!canRead(1)) { + g_logger().error("[{}] Not enough data to read a byte. Current position: {}, Length: {}", __FUNCTION__, info.position, info.length); + return {}; + } + + // Ensure that position is within bounds before decrementing + if (info.position == 0) { + g_logger().error("[{}] Position is at the beginning of the buffer. Cannot decrement.", __FUNCTION__); + return {}; + } + + try { + // Decrement position safely and return the byte + return buffer.at(info.position++); + } catch (const std::out_of_range &e) { + g_logger().error("[{}] Out of range error: {}. Position: {}, Buffer size: {}", __FUNCTION__, e.what(), info.position, buffer.size()); + } + + return {}; +} + +uint8_t NetworkMessage::getPreviousByte() { + // Check if position is at the beginning of the buffer + if (info.position == 0) { + g_logger().error("[{}] Attempted to get previous byte at position 0", __FUNCTION__); + return {}; // Return default value (0) when at the start of the buffer + } + + try { + // Safely decrement position and access the previous byte using 'at()' + return buffer.at(--info.position); + } catch (const std::out_of_range &e) { + // Log the out-of-range exception if accessing outside buffer limits + g_logger().error("[{}] Out of range error: {}. Position: {}, Buffer size: {}", __FUNCTION__, e.what(), info.position, buffer.size()); + } + + return {}; } -std::string NetworkMessage::getString(uint16_t stringLen /* = 0*/) { +std::string NetworkMessage::getString(uint16_t stringLen /* = 0*/, const std::source_location &location) { if (stringLen == 0) { stringLen = get(); } if (!canRead(stringLen)) { - return std::string(); + g_logger().error("[{}] not enough data to read string of length: {}. Called line {}:{} in {}", __FUNCTION__, stringLen, location.line(), location.column(), location.function_name()); + return {}; } - char* v = reinterpret_cast(buffer) + info.position; // does not break strict aliasing + if (stringLen > NETWORKMESSAGE_MAXSIZE) { + g_logger().error("[{}] exceded NetworkMessage max size: {}, actually size: {}. Called line '{}:{}' in '{}'", __FUNCTION__, NETWORKMESSAGE_MAXSIZE, stringLen, location.line(), location.column(), location.function_name()); + return {}; + } + + g_logger().trace("[{}] called line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + + // Copy the string from the buffer + std::string result(buffer.begin() + info.position, buffer.begin() + info.position + stringLen); info.position += stringLen; - return std::string(v, stringLen); + return result; } Position NetworkMessage::getPosition() { @@ -40,29 +118,85 @@ Position NetworkMessage::getPosition() { return pos; } -void NetworkMessage::addString(const std::string &value, const std::string &function /* = ""*/) { +// Skips count unknown/unused bytes in an incoming message +void NetworkMessage::skipBytes(int16_t count) { + info.position += count; +} + +void NetworkMessage::addString(const std::string &value, const std::source_location &location /*= std::source_location::current()*/, const std::string &function /* = ""*/) { size_t stringLen = value.length(); - if (value.empty() && !function.empty()) { - g_logger().debug("[NetworkMessage::addString] - Value string is empty, function '{}'", function); + if (value.empty()) { + if (!function.empty()) { + g_logger().debug("[{}] attempted to add an empty string. Called line '{}'", __FUNCTION__, function); + } else { + g_logger().debug("[{}] attempted to add an empty string. Called line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + } + + // Add a 0 length string, the std::array will be filled with 0s + add(uint16_t()); + return; } if (!canAdd(stringLen + 2)) { - g_logger().error("[NetworkMessage::addString] - NetworkMessage size is wrong: {}, function '{}'", stringLen, function); + if (!function.empty()) { + g_logger().error("[{}] NetworkMessage size is wrong: {}. Called line '{}'", __FUNCTION__, stringLen, function); + } else { + g_logger().error("[{}] NetworkMessage size is wrong: {}. Called line '{}:{}' in '{}'", __FUNCTION__, stringLen, location.line(), location.column(), location.function_name()); + } return; } if (stringLen > NETWORKMESSAGE_MAXSIZE) { - g_logger().error("[NetworkMessage::addString] - Exceded NetworkMessage max size: {}, actually size: {}, function '{}'", NETWORKMESSAGE_MAXSIZE, stringLen, function); + if (!function.empty()) { + g_logger().error("[{}] exceeded NetworkMessage max size: {}, actual size: {}. Called line '{}'", __FUNCTION__, NETWORKMESSAGE_MAXSIZE, stringLen, function); + } else { + g_logger().error("[{}] exceeded NetworkMessage max size: {}, actual size: {}. Called line '{}:{}' in '{}'", __FUNCTION__, NETWORKMESSAGE_MAXSIZE, stringLen, location.line(), location.column(), location.function_name()); + } return; } - add(stringLen); - memcpy(buffer + info.position, value.c_str(), stringLen); + if (!function.empty()) { + g_logger().trace("[{}] called line '{}'", __FUNCTION__, function); + } else { + g_logger().trace("[{}] called line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + } + + auto len = static_cast(stringLen); + add(len); + // Using to copy the string into the buffer + auto it = std::ranges::copy(value, buffer.begin() + info.position); + g_logger().trace("First value copied from sourceSpan: {}, second value copied from sourceSpan: {}", *it.in, *it.out); info.position += stringLen; info.length += stringLen; } -void NetworkMessage::addDouble(double value, uint8_t precision /* = 2*/) { +void NetworkMessage::addDouble(double value, uint8_t precision /*= 2*/) { addByte(precision); - add((value * std::pow(static_cast(10), precision)) + std::numeric_limits::max()); + add((value * std::pow(static_cast(SCALING_BASE), precision)) + std::numeric_limits::max()); +} + +double NetworkMessage::getDouble() { + // Retrieve the precision byte from the buffer + uint8_t precision = getByte(); + // Retrieve the scaled uint32_t value from the buffer + auto scaledValue = get(); + // Convert the scaled value back to double using the precision factor + double adjustedValue = static_cast(scaledValue) - static_cast(std::numeric_limits::max()); + // Convert back to the original double value using the precision factor + return adjustedValue / std::pow(static_cast(SCALING_BASE), precision); +} + +void NetworkMessage::addByte(uint8_t value, std::source_location location /*= std::source_location::current()*/) { + if (!canAdd(1)) { + g_logger().error("[{}] cannot add byte, buffer overflow. Called line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + return; + } + + g_logger().trace("[{}] called line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + try { + buffer.at(info.position++) = value; + info.length++; + } catch (const std::out_of_range &e) { + g_logger().error("[{}] buffer access out of range: {}. Called line '{}:{}' in '{}'", __FUNCTION__, e.what(), location.line(), location.column(), location.function_name()); + } } void NetworkMessage::addBytes(const char* bytes, size_t size) { @@ -79,19 +213,20 @@ void NetworkMessage::addBytes(const char* bytes, size_t size) { return; } - memcpy(buffer + info.position, bytes, size); + auto it = std::ranges::copy(bytes, bytes + size, buffer.begin() + info.position); + g_logger().trace("First value copied from sourceSpan: {}, second value copied from sourceSpan: {}", *it.in, *it.out); info.position += size; info.length += size; } void NetworkMessage::addPaddingBytes(size_t n) { -#define canAdd(size) ((size + info.position) < NETWORKMESSAGE_MAXSIZE) if (!canAdd(n)) { + g_logger().error("[NetworkMessage::addPaddingBytes] - Cannot add padding bytes, buffer overflow"); return; } -#undef canAdd - memset(buffer + info.position, 0x33, n); + std::fill(buffer.begin() + info.position, buffer.begin() + info.position + n, 0x33); + info.position += n; info.length += n; } @@ -100,3 +235,77 @@ void NetworkMessage::addPosition(const Position &pos) { add(pos.y); addByte(pos.z); } + +NetworkMessage::MsgSize_t NetworkMessage::getLength() const { + return info.length; +} + +void NetworkMessage::setLength(NetworkMessage::MsgSize_t newLength) { + info.length = newLength; +} + +NetworkMessage::MsgSize_t NetworkMessage::getBufferPosition() const { + return info.position; +} + +void NetworkMessage::setBufferPosition(NetworkMessage::MsgSize_t newPosition) { + info.position = newPosition; +} + +uint16_t NetworkMessage::getLengthHeader() const { + return static_cast(buffer[0] | buffer[1] << 8); +} + +bool NetworkMessage::isOverrun() const { + return info.overrun; +} + +uint8_t* NetworkMessage::getBuffer() { + return buffer.data(); +} + +const uint8_t* NetworkMessage::getBuffer() const { + return buffer.data(); +} + +uint8_t* NetworkMessage::getBodyBuffer() { + info.position = 2; + // Return the pointer to the body of the buffer starting after the header + // Convert HEADER_LENGTH to uintptr_t to ensure safe pointer arithmetic with enum type + return buffer.data() + static_cast(HEADER_LENGTH); +} + +bool NetworkMessage::canAdd(size_t size) const { + return (size + info.position) < MAX_BODY_LENGTH; +} + +bool NetworkMessage::canRead(int32_t size) const { + return size <= (info.length - (info.position - INITIAL_BUFFER_POSITION)); +} + +void NetworkMessage::append(const NetworkMessage &other) { + size_t otherLength = other.getLength(); + size_t otherStartPos = NetworkMessage::INITIAL_BUFFER_POSITION; // Always start copying from the initial buffer position + + g_logger().debug("[{}] appending message, other Length = {}, current length = {}, current position = {}, other start position = {}", __FUNCTION__, otherLength, info.length, info.position, otherStartPos); + + // Ensure there is enough space in the buffer to append the new data + if (!canAdd(otherLength)) { + std::cerr << "Cannot append message: not enough space in buffer.\n"; + return; + } + + // Create a span for the source data (from the other message) + std::span sourceSpan(other.getBuffer() + otherStartPos, otherLength); + // Create a span for the destination in the current buffer + std::span destSpan(buffer.data() + info.position, otherLength); + // Copy the data from the source span to the destination span + auto it = std::ranges::copy(sourceSpan, destSpan.begin()); + g_logger().trace("First value copied from sourceSpan: {}, second value copied from sourceSpan: {}", *it.in, *it.out); + + // Update the buffer information + info.length += otherLength; + info.position += otherLength; + // Debugging output after appending + g_logger().debug("After append: New Length = {}, New Position = {}", info.length, info.position); +} diff --git a/src/server/network/message/networkmessage.hpp b/src/server/network/message/networkmessage.hpp index 02e19253146..1889b7725b6 100644 --- a/src/server/network/message/networkmessage.hpp +++ b/src/server/network/message/networkmessage.hpp @@ -27,62 +27,64 @@ class NetworkMessage { // 2 bytes for encrypted message size static constexpr MsgSize_t INITIAL_BUFFER_POSITION = 8; - NetworkMessage() = default; + int32_t decodeHeader(); void reset() { info = {}; } // simply read functions for incoming message - uint8_t getByte() { - if (!canRead(1)) { - return 0; - } - - return buffer[info.position++]; - } + uint8_t getByte(); - uint8_t getPreviousByte() { - return buffer[--info.position]; - } + uint8_t getPreviousByte(); template T get() { + static_assert(!std::is_same_v, "Error: get() is not allowed. Use getDouble() instead."); + static_assert(std::is_trivially_copyable_v, "Type T must be trivially copyable"); if (!canRead(sizeof(T))) { - return 0; + return T(); } - T v; - memcpy(&v, buffer + info.position, sizeof(T)); + // Create a temporary byte array to store the value read from the buffer. + std::array tempBuffer; + // Copy data from the buffer to the temporary array + std::span sourceSpan(buffer.data() + info.position, sizeof(T)); + auto it = std::ranges::copy(sourceSpan, tempBuffer.begin()); + g_logger().trace("First value copied from sourceSpan: {}, second value copied from sourceSpan: {}", *it.in, *it.out); + // Update the read position in the buffer info.position += sizeof(T); - return v; + // Convert the byte array to type T using std::bit_cast and return the result + return std::bit_cast(tempBuffer); } - std::string getString(uint16_t stringLen = 0); + std::string getString(uint16_t stringLen = 0, const std::source_location &location = std::source_location::current()); Position getPosition(); // skips count unknown/unused bytes in an incoming message - void skipBytes(int16_t count) { - info.position += count; - } + void skipBytes(int16_t count); // simply write functions for outgoing message - void addByte(uint8_t value) { - if (!canAdd(1)) { - return; - } - - buffer[info.position++] = value; - info.length++; - } + void addByte(uint8_t value, std::source_location location = std::source_location::current()); template - void add(T value) { + void add(T value, std::source_location location = std::source_location::current()) { if (!canAdd(sizeof(T))) { + g_logger().error("Cannot add value of size {}, buffer overflow", sizeof(T)); return; } - memcpy(buffer + info.position, &value, sizeof(T)); + g_logger().trace("[{}] called line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + + // Ensure that T is trivially copyable + static_assert(std::is_trivially_copyable_v, "Type T must be trivially copyable"); + // Convert the value to an array of unsigned char using std::bit_cast + auto byteArray = std::bit_cast>(value); + // Create a span from the byte array + std::span byteSpan(byteArray); + // Copy the bytes into the buffer + auto it = std::ranges::copy(byteSpan.begin(), byteSpan.end(), buffer.begin() + info.position); + g_logger().trace("First value copied from sourceSpan: {}, second value copied from sourceSpan: {}", *it.in, *it.out); info.position += sizeof(T); info.length += sizeof(T); } @@ -94,74 +96,66 @@ class NetworkMessage { * Adds a string to the network message buffer. * * @param value The string value to be added to the message buffer. - * @param function * @param function An optional parameter that specifies the function name from which `addString` is invoked. - * Including this enhances logging by adding the function name to the debug and error log messages. - * This helps in debugging by indicating the context when issues occur, such as attempting to add an - * empty string or when there are message size errors. * - * When the function parameter is used, it aids in identifying the context in log messages, - * making it easier to diagnose issues related to network message construction, - * especially in complex systems where the same method might be called from multiple places. + * @param location An optional parameter that captures the location from which `addString` is invoked. + * This enhances logging by including the file name, line number, and function name + * in debug and error log messages. It helps in debugging by indicating the context when issues occur, + * such as attempting to add an empty string or when there are message size errors. + * + * Using `std::source_location` automatically captures the caller context, making it easier + * to diagnose issues related to network message construction, especially in complex systems + * where the same method might be called from multiple places. + * + * @param function An optional string parameter provided from Lua that specifies the name of the Lua + * function or context from which `addString` is called. When this parameter is not empty, + * it overrides the information captured by `std::source_location` in log messages. + * This allows for more precise and meaningful logging in scenarios where `addString` is invoked + * directly from Lua scripts, enabling developers to trace the origin of network messages + * back to specific Lua functions or contexts. + * + * This dual-parameter approach ensures flexibility: + * - When called from C++ without specifying `function`, `std::source_location` provides the necessary + * context for logging. + * - When called from Lua with a `function` name, the provided string offers clearer insight into + * the Lua-side invocation, enhancing the ability to debug and maintain Lua-C++ integrations. + * + * @note It is recommended to use the `function` parameter when invoking `addString` from Lua to ensure + * that log messages accurately reflect the Lua context. When invoking from C++, omitting the `function` + * parameter allows `std::source_location` to automatically capture the C++ context. */ - void addString(const std::string &value, const std::string &function = ""); + void addString(const std::string &value, const std::source_location &location = std::source_location::current(), const std::string &function = ""); void addDouble(double value, uint8_t precision = 2); + double getDouble(); // write functions for complex types void addPosition(const Position &pos); - MsgSize_t getLength() const { - return info.length; - } + MsgSize_t getLength() const; - void setLength(MsgSize_t newLength) { - info.length = newLength; - } + void setLength(MsgSize_t newLength); - MsgSize_t getBufferPosition() const { - return info.position; - } + MsgSize_t getBufferPosition() const; - void setBufferPosition(MsgSize_t newPosition) { - info.position = newPosition; - } + void setBufferPosition(MsgSize_t newPosition); - uint16_t getLengthHeader() const { - return static_cast(buffer[0] | buffer[1] << 8); - } + uint16_t getLengthHeader() const; - int32_t decodeHeader(); + bool isOverrun() const; - bool isOverrun() const { - return info.overrun; - } + uint8_t* getBuffer(); - uint8_t* getBuffer() { - return buffer; - } + const uint8_t* getBuffer() const; - const uint8_t* getBuffer() const { - return buffer; - } + uint8_t* getBodyBuffer(); - uint8_t* getBodyBuffer() { - info.position = 2; - return buffer + HEADER_LENGTH; - } + bool canAdd(size_t size) const; -protected: - bool canAdd(size_t size) const { - return (size + info.position) < MAX_BODY_LENGTH; - } + bool canRead(int32_t size) const; - bool canRead(int32_t size) { - if ((info.position + size) > (info.length + 8) || size >= (NETWORKMESSAGE_MAXSIZE - info.position)) { - info.overrun = true; - return false; - } - return true; - } + void append(const NetworkMessage &other); +protected: struct NetworkMessageInfo { MsgSize_t length = 0; MsgSize_t position = INITIAL_BUFFER_POSITION; @@ -169,5 +163,5 @@ class NetworkMessage { }; NetworkMessageInfo info; - uint8_t buffer[NETWORKMESSAGE_MAXSIZE]; + std::array buffer = {}; }; diff --git a/src/server/network/message/outputmessage.hpp b/src/server/network/message/outputmessage.hpp index 1f590fbd214..459e243cea3 100644 --- a/src/server/network/message/outputmessage.hpp +++ b/src/server/network/message/outputmessage.hpp @@ -24,7 +24,7 @@ class OutputMessage : public NetworkMessage { OutputMessage &operator=(const OutputMessage &) = delete; uint8_t* getOutputBuffer() { - return buffer + outputBufferStart; + return buffer.data() + outputBufferStart; } void writeMessageLength() { @@ -41,14 +41,18 @@ class OutputMessage : public NetworkMessage { void append(const NetworkMessage &msg) { auto msgLen = msg.getLength(); - memcpy(buffer + info.position, msg.getBuffer() + INITIAL_BUFFER_POSITION, msgLen); + std::span sourceSpan(msg.getBuffer() + INITIAL_BUFFER_POSITION, msgLen); + std::span destSpan(buffer.data() + info.position, msgLen); + std::ranges::copy(sourceSpan, destSpan.begin()); info.length += msgLen; info.position += msgLen; } void append(const OutputMessage_ptr &msg) { auto msgLen = msg->getLength(); - memcpy(buffer + info.position, msg->getBuffer() + INITIAL_BUFFER_POSITION, msgLen); + std::span sourceSpan(msg->getBuffer() + INITIAL_BUFFER_POSITION, msgLen); + std::span destSpan(buffer.data() + info.position, msgLen); + std::ranges::copy(sourceSpan, destSpan.begin()); info.length += msgLen; info.position += msgLen; } @@ -61,10 +65,20 @@ class OutputMessage : public NetworkMessage { return; } + // Ensure at runtime that outputBufferStart >= sizeof(T) assert(outputBufferStart >= sizeof(T)); + // Move the buffer position back to make space for the header outputBufferStart -= sizeof(T); - memcpy(buffer + outputBufferStart, &addHeader, sizeof(T)); - // added header size to the message size + + static_assert(std::is_trivially_copyable_v, "Type T must be trivially copyable"); + + // Convert the header to an array of unsigned char using std::bit_cast + auto byteArray = std::bit_cast>(addHeader); + + std::span byteSpan(byteArray); + // Copy the bytes into the buffer + std::ranges::copy(byteSpan, buffer.begin() + outputBufferStart); + // Update the message size info.length += sizeof(T); } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 7ae02e31b10..560ae1168c5 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -242,7 +242,7 @@ namespace { g_logger().debug("Sendding category number '{}', category name '{}'", static_cast(value), magic_enum::enum_name(value).data()); msg.addByte(static_cast(value)); - msg.addString(toStartCaseWithSpace(magic_enum::enum_name(value).data()), "void sendContainerCategory - toStartCaseWithSpace(magic_enum::enum_name(value).data())"); + msg.addString(toStartCaseWithSpace(magic_enum::enum_name(value).data())); } } } // namespace @@ -568,7 +568,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x16); - output->addString(ss.str(), "ProtocolGame::login - ss.str()"); + output->addString(ss.str()); output->addByte(retryTime); send(output); disconnect(); @@ -851,7 +851,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x14); - output->addString(ss.str(), "ProtocolGame::onRecvFirstMessage - ss.str()"); + output->addString(ss.str()); send(output); g_dispatcher().scheduleEvent( 1000, [self = getThis()] { self->disconnect(); }, "ProtocolGame::disconnect" @@ -893,7 +893,7 @@ void ProtocolGame::onConnect() { void ProtocolGame::disconnectClient(const std::string &message) const { auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x14); - output->addString(message, "ProtocolGame::disconnectClient - message"); + output->addString(message); send(output); disconnect(); } @@ -1317,7 +1317,7 @@ void ProtocolGame::parsePacketFromDispatcher(NetworkMessage msg, uint8_t recvbyt parseWheelGemAction(msg); break; case 0xE8: - parseDebugAssert(msg); + parseOfferDescription(msg); break; case 0xEB: parsePreyAction(msg); @@ -2104,10 +2104,10 @@ void ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::s const ItemType &it = Item::items[itemId]; if (item) { - msg.addString(item->getName(), "ProtocolGame::sendItemInspection - item->getName()"); + msg.addString(item->getName()); AddItem(msg, item); } else { - msg.addString(it.name, "ProtocolGame::sendItemInspection - it.name"); + msg.addString(it.name); AddItem(msg, it.id, itemCount, 0); } msg.addByte(0); @@ -2115,8 +2115,8 @@ void ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::s auto descriptions = Item::getDescriptions(it, item); msg.addByte(descriptions.size()); for (const auto &description : descriptions) { - msg.addString(description.first, "ProtocolGame::sendItemInspection - description.first"); - msg.addString(description.second, "ProtocolGame::sendItemInspection - description.second"); + msg.addString(description.first); + msg.addString(description.second); } writeToOutputBuffer(msg); } @@ -2207,8 +2207,8 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.addByte(1); // Worlds auto serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__); - msg.addString(serverName, "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // First World - msg.addString(serverName, "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // Selected World + msg.addString(serverName); // First World + msg.addString(serverName); // Selected World msg.addByte(0); // Game World Category: 0xFF(-1) - Selected World msg.addByte(0); // BattlEye World Type @@ -2218,7 +2218,7 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.skipBytes(1); // Vocation Count msg.add(0xFFFFFFFF); // All Vocations - hardcoded - msg.addString("(all)", "ProtocolGame::sendHighscores - (all)"); // All Vocations - hardcoded + msg.addString("(all)"); // All Vocations - hardcoded uint32_t selectedVocation = 0xFFFFFFFF; const auto vocationsMap = g_vocations().getVocations(); @@ -2226,7 +2226,7 @@ void ProtocolGame::sendHighscores(const std::vector &charact const auto &vocation = it.second; if (vocation->getFromVocation() == static_cast(vocation->getId())) { msg.add(vocation->getFromVocation()); // Vocation Id - msg.addString(vocation->getVocName(), "ProtocolGame::sendHighscores - vocation.getVocName()"); // Vocation Name + msg.addString(vocation->getVocName()); // Vocation Name ++vocations; if (vocation->getFromVocation() == vocationId) { selectedVocation = vocationId; @@ -2242,7 +2242,7 @@ void ProtocolGame::sendHighscores(const std::vector &charact for (const HighscoreCategory &category : highscoreCategories) { g_logger().debug("[ProtocolGame::sendHighscores] - Category: {} - Name: {}", category.m_id, category.m_name); msg.addByte(category.m_id); // Category Id - msg.addString(category.m_name, "ProtocolGame::sendHighscores - category.name"); // Category Name + msg.addString(category.m_name); // Category Name if (category.m_id == categoryId) { selectedCategory = categoryId; } @@ -2255,10 +2255,10 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.addByte(characters.size()); // Character Count for (const HighscoreCharacter &character : characters) { msg.add(character.rank); // Rank - msg.addString(character.name, "ProtocolGame::sendHighscores - character.name"); // Character Name - msg.addString(character.loyaltyTitle, "ProtocolGame::sendHighscores - character.loyaltyTitle"); // Character Loyalty Title + msg.addString(character.name); // Character Name + msg.addString(character.loyaltyTitle); // Character Loyalty Title msg.addByte(character.vocation); // Vocation Id - msg.addString(serverName, "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // World + msg.addString(serverName); // World msg.add(character.level); // Level msg.addByte((player->getGUID() == character.id)); // Player Indicator Boolean msg.add(character.points); // Points @@ -2322,7 +2322,7 @@ void ProtocolGame::parseBestiarysendRaces() { BestClass = mtype->info.bestiaryClass; } } - msg.addString(BestClass, "ProtocolGame::parseBestiarysendRaces - BestClass"); + msg.addString(BestClass); msg.add(count); uint16_t unlockedCount = g_iobestiary().getBestiaryRaceUnlocked(player, static_cast(i)); msg.add(unlockedCount); @@ -2374,7 +2374,7 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { NetworkMessage newmsg; newmsg.addByte(0xd7); newmsg.add(raceId); - newmsg.addString(Class, "ProtocolGame::parseBestiarysendMonsterData - Class"); + newmsg.addString(Class); newmsg.addByte(currentLevel); @@ -2419,7 +2419,7 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { newmsg.addByte(difficult); newmsg.addByte(0); // 1 if special event - 0 if regular loot (?) if (g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true) { - newmsg.addString(loot.name, "ProtocolGame::parseBestiarysendMonsterData - loot.name"); + newmsg.addString(loot.name); newmsg.addByte(loot.countmax > 0 ? 0x1 : 0x0); } } @@ -2452,7 +2452,7 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { } newmsg.add(1); - newmsg.addString(mtype->info.bestiaryLocations, "ProtocolGame::parseBestiarysendMonsterData - mtype->info.bestiaryLocations"); + newmsg.addString(mtype->info.bestiaryLocations); } if (currentLevel > 3) { @@ -2530,7 +2530,7 @@ void ProtocolGame::sendTeamFinderList() { uint8_t status = 0; uint16_t membersSize = 0; msg.add(leader->getGUID()); - msg.addString(leader->getName(), "ProtocolGame::sendTeamFinderList - leader->getName()"); + msg.addString(leader->getName()); msg.add(teamAssemble->minLevel); msg.add(teamAssemble->maxLevel); msg.addByte(teamAssemble->vocationIDs); @@ -2636,7 +2636,7 @@ void ProtocolGame::sendLeaderTeamFinder(bool reset) { } msg.add(leader->getGUID()); - msg.addString(leader->getName(), "ProtocolGame::sendLeaderTeamFinder - leader->getName()"); + msg.addString(leader->getName()); msg.add(leader->getLevel()); msg.addByte(leader->getVocation()->getClientId()); msg.addByte(3); @@ -2647,7 +2647,7 @@ void ProtocolGame::sendLeaderTeamFinder(bool reset) { continue; } msg.add(member->getGUID()); - msg.addString(member->getName(), "ProtocolGame::sendLeaderTeamFinder - member->getName()"); + msg.addString(member->getName()); msg.add(member->getLevel()); msg.addByte(member->getVocation()->getClientId()); msg.addByte(memberPair.second); @@ -2913,8 +2913,8 @@ void ProtocolGame::BestiarysendCharms() { msg.addByte(charmList.size()); for (const auto &c_type : charmList) { msg.addByte(c_type->id); - msg.addString(c_type->name, "ProtocolGame::BestiarysendCharms - c_type->name"); - msg.addString(c_type->description, "ProtocolGame::BestiarysendCharms - c_type->description"); + msg.addString(c_type->name); + msg.addString(c_type->description); msg.addByte(0); // Unknown msg.add(c_type->points); if (g_iobestiary().hasCharmUnlockedRuneBit(c_type, player->getUnlockedRunesBit())) { @@ -2986,7 +2986,7 @@ void ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) { } NetworkMessage newmsg; newmsg.addByte(0xd6); - newmsg.addString(text, "ProtocolGame::parseBestiarysendCreatures - text"); + newmsg.addString(text); newmsg.add(race.size()); std::map creaturesKilled = g_iobestiary().getBestiaryKillCountByMonsterIDs(player, race); @@ -3039,18 +3039,9 @@ void ProtocolGame::parseGreet(NetworkMessage &msg) { g_game().playerNpcGreet(player->getID(), npcId); } -void ProtocolGame::parseDebugAssert(NetworkMessage &msg) { - if (debugAssertSent) { - return; - } - - debugAssertSent = true; - - std::string assertLine = msg.getString(); - std::string date = msg.getString(); - std::string description = msg.getString(); - std::string comment = msg.getString(); - g_game().playerDebugAssert(player->getID(), assertLine, date, description, comment); +void ProtocolGame::parseOfferDescription(NetworkMessage &msg) { + auto offerId = msg.get(); + g_logger().debug("[{}] offer id: {}", __FUNCTION__, offerId); } void ProtocolGame::parsePreyAction(NetworkMessage &msg) { @@ -3214,7 +3205,7 @@ void ProtocolGame::parseSeekInContainer(NetworkMessage &msg) { void ProtocolGame::sendOpenPrivateChannel(const std::string &receiver) { NetworkMessage msg; msg.addByte(0xAD); - msg.addString(receiver, "ProtocolGame::sendOpenPrivateChannel - receiver"); + msg.addString(receiver); writeToOutputBuffer(msg); } @@ -3234,7 +3225,7 @@ void ProtocolGame::sendChannelEvent(uint16_t channelId, const std::string &playe NetworkMessage msg; msg.addByte(0xF3); msg.add(channelId); - msg.addString(playerName, "ProtocolGame::sendChannelEvent - playerName"); + msg.addString(playerName); msg.addByte(channelEvent); writeToOutputBuffer(msg); } @@ -3435,7 +3426,7 @@ void ProtocolGame::sendAddMarker(const Position &pos, uint8_t markType, const st msg.addPosition(pos); msg.addByte(markType); - msg.addString(desc, "ProtocolGame::sendAddMarker - desc"); + msg.addString(desc); writeToOutputBuffer(msg); } @@ -3460,13 +3451,13 @@ void ProtocolGame::sendCyclopediaCharacterBaseInformation() { msg.addByte(0xDA); msg.addByte(CYCLOPEDIA_CHARACTERINFO_BASEINFORMATION); msg.addByte(0x00); - msg.addString(player->getName(), "ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getName()"); - msg.addString(player->getVocation()->getVocName(), "ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getVocation()->getVocName()"); + msg.addString(player->getName()); + msg.addString(player->getVocation()->getVocName()); msg.add(player->getLevel()); AddOutfit(msg, player->getDefaultOutfit(), false); msg.addByte(0x01); // Store summary & Character titles - msg.addString(player->title()->getCurrentTitleName(), "ProtocolGame::sendCyclopediaCharacterBaseInformation - player->title()->getCurrentTitleName()"); // character title + msg.addString(player->title()->getCurrentTitleName()); // character title writeToOutputBuffer(msg); } @@ -3711,7 +3702,7 @@ void ProtocolGame::sendCyclopediaCharacterRecentDeaths(uint16_t page, uint16_t p msg.add(entries.size()); for (const RecentDeathEntry &entry : entries) { msg.add(entry.timestamp); - msg.addString(entry.cause, "ProtocolGame::sendCyclopediaCharacterRecentDeaths - entry.cause"); + msg.addString(entry.cause); } writeToOutputBuffer(msg); @@ -3731,7 +3722,7 @@ void ProtocolGame::sendCyclopediaCharacterRecentPvPKills(uint16_t page, uint16_t msg.add(entries.size()); for (const RecentPvPKillEntry &entry : entries) { msg.add(entry.timestamp); - msg.addString(entry.description, "ProtocolGame::sendCyclopediaCharacterRecentPvPKills - entry.description"); + msg.addString(entry.description); msg.addByte(entry.status); } @@ -3750,15 +3741,13 @@ void ProtocolGame::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, msg.add(player->achiev()->getPoints()); msg.add(secretsUnlocked); msg.add(static_cast(achievementsUnlocked.size())); - std::string messageAchievName = "ProtocolGame::sendCyclopediaCharacterAchievements - achievement.name"; - std::string messageAchievDesc = "ProtocolGame::sendCyclopediaCharacterAchievements - achievement.description"; for (const auto &[achievement, addedTimestamp] : achievementsUnlocked) { msg.add(achievement.id); msg.add(addedTimestamp); if (achievement.secret) { msg.addByte(0x01); - msg.addString(achievement.name, messageAchievName); - msg.addString(achievement.description, messageAchievDesc); + msg.addString(achievement.name); + msg.addString(achievement.description); msg.addByte(achievement.grade); } else { msg.addByte(0x00); @@ -3904,7 +3893,7 @@ void ProtocolGame::sendCyclopediaCharacterOutfitsMounts() { ++outfitSize; msg.add(outfit->lookType); - msg.addString(outfit->name, "ProtocolGame::sendCyclopediaCharacterOutfitsMounts - outfit->name"); + msg.addString(outfit->name); msg.addByte(addons); if (from == "store") { msg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITTYPE_STORE); @@ -3935,7 +3924,7 @@ void ProtocolGame::sendCyclopediaCharacterOutfitsMounts() { ++mountSize; msg.add(mount->clientId); - msg.addString(mount->name, "ProtocolGame::sendCyclopediaCharacterOutfitsMounts - mount->name"); + msg.addString(mount->name); if (type == "store") { msg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITTYPE_STORE); } else if (type == "quest") { @@ -3964,7 +3953,7 @@ void ProtocolGame::sendCyclopediaCharacterOutfitsMounts() { } ++familiarsSize; msg.add(familiar->lookType); - msg.addString(familiar->name, "ProtocolGame::sendCyclopediaCharacterOutfitsMounts - familiar.name"); + msg.addString(familiar->name); if (type == "quest") { msg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITTYPE_QUEST); } else { @@ -4000,7 +3989,7 @@ void ProtocolGame::sendCyclopediaCharacterStoreSummary() { 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"); + msg.addString(name); auto blessValue = enumToValue(bless); if (player->hasBlessing(blessValue)) { msg.addByte(static_cast(player->blessings[blessValue - 1])); @@ -4057,7 +4046,7 @@ void ProtocolGame::sendCyclopediaCharacterStoreSummary() { for (const auto &hItem_it : houseItems) { const ItemType &it = Item::items[hItem_it.first]; msg.add(it.id); // Item ID - msg.addString(it.name, "ProtocolGame::sendCyclopediaCharacterStoreSummary - houseItem.name"); + msg.addString(it.name); msg.addByte(hItem_it.second); } @@ -4082,7 +4071,7 @@ void ProtocolGame::sendCyclopediaCharacterInspection() { ++inventoryItems; msg.addByte(slot); - msg.addString(inventoryItem->getName(), "ProtocolGame::sendCyclopediaCharacterInspection - inventoryItem->getName()"); + msg.addString(inventoryItem->getName()); AddItem(msg, inventoryItem); uint8_t itemImbuements = 0; @@ -4106,12 +4095,12 @@ void ProtocolGame::sendCyclopediaCharacterInspection() { auto descriptions = Item::getDescriptions(Item::items[inventoryItem->getID()], inventoryItem); msg.addByte(descriptions.size()); for (const auto &description : descriptions) { - msg.addString(description.first, "ProtocolGame::sendCyclopediaCharacterInspection - description.first"); - msg.addString(description.second, "ProtocolGame::sendCyclopediaCharacterInspection - description.second"); + msg.addString(description.first); + msg.addString(description.second); } } } - msg.addString(player->getName(), "ProtocolGame::sendCyclopediaCharacterInspection - player->getName()"); + msg.addString(player->getName()); AddOutfit(msg, player->getDefaultOutfit(), false); // Player overall summary @@ -4122,33 +4111,33 @@ void ProtocolGame::sendCyclopediaCharacterInspection() { // Player title if (player->title()->getCurrentTitle() != 0) { playerDescriptionSize++; - msg.addString("Character Title", "ProtocolGame::sendCyclopediaCharacterInspection - Title"); - msg.addString(player->title()->getCurrentTitleName(), "ProtocolGame::sendCyclopediaCharacterInspection - player->title()->getCurrentTitleName()"); + msg.addString("Character Title"); + msg.addString(player->title()->getCurrentTitleName()); } // Level description playerDescriptionSize++; - msg.addString("Level", "ProtocolGame::sendCyclopediaCharacterInspection - Level"); - msg.addString(std::to_string(player->getLevel()), "ProtocolGame::sendCyclopediaCharacterInspection - std::to_string(player->getLevel())"); + msg.addString("Level"); + msg.addString(std::to_string(player->getLevel())); // Vocation description playerDescriptionSize++; - msg.addString("Vocation", "ProtocolGame::sendCyclopediaCharacterInspection - Vocation"); - msg.addString(player->getVocation()->getVocName(), "ProtocolGame::sendCyclopediaCharacterInspection - player->getVocation()->getVocName()"); + msg.addString("Vocation"); + msg.addString(player->getVocation()->getVocName()); // Loyalty title if (!player->getLoyaltyTitle().empty()) { playerDescriptionSize++; - msg.addString("Loyalty Title", "ProtocolGame::sendCyclopediaCharacterInspection - Loyalty Title"); - msg.addString(player->getLoyaltyTitle(), "ProtocolGame::sendCyclopediaCharacterInspection - player->getLoyaltyTitle()"); + msg.addString("Loyalty Title"); + msg.addString(player->getLoyaltyTitle()); } // Marriage description if (const auto spouseId = player->getMarriageSpouse(); spouseId > 0) { if (const auto &spouse = g_game().getPlayerByID(spouseId, true); spouse) { playerDescriptionSize++; - msg.addString("Married to", "ProtocolGame::sendCyclopediaCharacterInspection - Married to"); - msg.addString(spouse->getName(), "ProtocolGame::sendCyclopediaCharacterInspection - spouse->getName()"); + msg.addString("Married to"); + msg.addString(spouse->getName()); } } @@ -4158,7 +4147,7 @@ void ProtocolGame::sendCyclopediaCharacterInspection() { slot && slot->isOccupied()) { playerDescriptionSize++; std::string activePrey = fmt::format("Active Prey {}", slotId + 1); - msg.addString(activePrey, "ProtocolGame::sendCyclopediaCharacterInspection - active prey"); + msg.addString(activePrey); std::string desc; if (auto mtype = g_monsters().getMonsterTypeByRaceId(slot->selectedRaceId)) { @@ -4180,17 +4169,17 @@ void ProtocolGame::sendCyclopediaCharacterInspection() { uint8_t hours = slot->bonusTimeLeft / 3600; uint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60; desc.append(fmt::format("{}:{}{}h", hours, (minutes < 10 ? "0" : ""), minutes)); - msg.addString(desc, "ProtocolGame::sendCyclopediaCharacterInspection - prey description"); + msg.addString(desc); } } // Outfit description playerDescriptionSize++; - msg.addString("Outfit", "ProtocolGame::sendCyclopediaCharacterInspection - Outfit"); + msg.addString("Outfit"); if (const auto outfit = Outfits::getInstance().getOutfitByLookType(player, player->getDefaultOutfit().lookType)) { - msg.addString(outfit->name, "ProtocolGame::sendCyclopediaCharacterInspection - outfit->name"); + msg.addString(outfit->name); } else { - msg.addString("unknown", "ProtocolGame::sendCyclopediaCharacterInspection - unknown"); + msg.addString("unknown"); } msg.setBufferPosition(startInventory); @@ -4217,7 +4206,7 @@ void ProtocolGame::sendCyclopediaCharacterBadges() { msg.addByte(loggedPlayer ? 0x01 : 0x00); // IsOnline msg.addByte(player->isPremium() ? 0x01 : 0x00); // IsPremium (GOD has always 'Premium') // Character loyalty title - msg.addString(player->getLoyaltyTitle(), "ProtocolGame::sendCyclopediaCharacterBadges - player->getLoyaltyTitle()"); + msg.addString(player->getLoyaltyTitle()); uint8_t badgesSize = 0; auto badgesSizePosition = msg.getBufferPosition(); @@ -4225,7 +4214,7 @@ void ProtocolGame::sendCyclopediaCharacterBadges() { for (const auto &badge : g_game().getBadges()) { if (player->badge()->hasBadge(badge.m_id)) { msg.add(badge.m_id); - msg.addString(badge.m_name, "ProtocolGame::sendCyclopediaCharacterBadges - name"); + msg.addString(badge.m_name); badgesSize++; } } @@ -4249,14 +4238,11 @@ void ProtocolGame::sendCyclopediaCharacterTitles() { msg.addByte(0x00); // 0x00 Here means 'no error' msg.addByte(player->title()->getCurrentTitle()); msg.addByte(static_cast(titles.size())); - - std::string messageTitleName = "ProtocolGame::sendCyclopediaCharacterTitles - title.name"; - std::string messageTitleDesc = "ProtocolGame::sendCyclopediaCharacterTitles - title.description"; for (const auto &title : titles) { msg.addByte(title.m_id); auto titleName = player->title()->getNameBySex(player->getSex(), title.m_maleName, title.m_femaleName); - msg.addString(titleName, messageTitleName); - msg.addString(title.m_description, messageTitleDesc); + msg.addString(titleName); + msg.addString(title.m_description); msg.addByte(title.m_permanent ? 0x01 : 0x00); auto isUnlocked = player->title()->isTitleUnlocked(title.m_id); msg.addByte(isUnlocked ? 0x01 : 0x00); @@ -4503,7 +4489,7 @@ void ProtocolGame::sendTextMessage(const TextMessage &message) { default: break; } - msg.addString(message.text, "ProtocolGame::sendTextMessage - message.text"); + msg.addString(message.text); writeToOutputBuffer(msg); } @@ -4518,9 +4504,9 @@ void ProtocolGame::sendCreatePrivateChannel(uint16_t channelId, const std::strin NetworkMessage msg; msg.addByte(0xB2); msg.add(channelId); - msg.addString(channelName, "ProtocolGame::sendCreatePrivateChannel - channelName"); + msg.addString(channelName); msg.add(0x01); - msg.addString(player->getName(), "ProtocolGame::sendCreatePrivateChannel - player->getName()"); + msg.addString(player->getName()); msg.add(0x00); writeToOutputBuffer(msg); } @@ -4533,7 +4519,7 @@ void ProtocolGame::sendChannelsDialog() { msg.addByte(list.size()); for (const auto &channel : list) { msg.add(channel->getId()); - msg.addString(channel->getName(), "ProtocolGame::sendChannelsDialog - channel->getName()"); + msg.addString(channel->getName()); } writeToOutputBuffer(msg); @@ -4544,12 +4530,12 @@ void ProtocolGame::sendChannel(uint16_t channelId, const std::string &channelNam msg.addByte(0xAC); msg.add(channelId); - msg.addString(channelName, "ProtocolGame::sendChannel - channelName"); + msg.addString(channelName); if (channelUsers) { msg.add(channelUsers->size()); for (const auto &it : *channelUsers) { - msg.addString(it.second->getName(), "ProtocolGame::sendChannel - it.second->getName()"); + msg.addString(it.second->getName()); } } else { msg.add(0x00); @@ -4558,7 +4544,7 @@ void ProtocolGame::sendChannel(uint16_t channelId, const std::string &channelNam if (invitedUsers) { msg.add(invitedUsers->size()); for (const auto &it : *invitedUsers) { - msg.addString(it.second->getName(), "ProtocolGame::sendChannel - it.second->getName()"); + msg.addString(it.second->getName()); } } else { msg.add(0x00); @@ -4570,11 +4556,11 @@ void ProtocolGame::sendChannelMessage(const std::string &author, const std::stri NetworkMessage msg; msg.addByte(0xAA); msg.add(0x00); - msg.addString(author, "ProtocolGame::sendChannelMessage - author"); + msg.addString(author); msg.add(0x00); msg.addByte(type); msg.add(channel); - msg.addString(text, "ProtocolGame::sendChannelMessage - text"); + msg.addString(text); writeToOutputBuffer(msg); } @@ -4634,10 +4620,10 @@ void ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr contain if (container->getID() == ITEM_BROWSEFIELD) { AddItem(msg, ITEM_BAG, 1, container->getTier()); - msg.addString("Browse Field", "ProtocolGame::sendContainer - Browse Field"); + msg.addString("Browse Field"); } else { AddItem(msg, container); - msg.addString(container->getName(), "ProtocolGame::sendContainer - container->getName()"); + msg.addString(container->getName()); } const auto itemsStoreInboxToSend = container->getStoreInboxFilteredItems(); @@ -4793,7 +4779,7 @@ void ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) { NetworkMessage msg; msg.addByte(0xCF); AddItem(msg, lootedItem); - msg.addString(lootedItem->getName(), "ProtocolGame::sendLootStats - lootedItem->getName()"); + msg.addString(lootedItem->getName()); item->setIsLootTrackeable(false); writeToOutputBuffer(msg); @@ -4804,7 +4790,7 @@ void ProtocolGame::sendShop(std::shared_ptr npc) { Benchmark brenchmark; NetworkMessage msg; msg.addByte(0x7A); - msg.addString(npc->getName(), "ProtocolGame::sendShop - npc->getName()"); + msg.addString(npc->getName()); if (!oldProtocol) { msg.add(npc->getCurrency()); @@ -5085,7 +5071,7 @@ void ProtocolGame::sendMarketBrowseItem(uint16_t itemId, const MarketOfferList & } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName, "ProtocolGame::sendMarketBrowseItem - offer.playerName"); + msg.addString(offer.playerName); } msg.add(sellOffers.size()); @@ -5098,7 +5084,7 @@ void ProtocolGame::sendMarketBrowseItem(uint16_t itemId, const MarketOfferList & } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName, "ProtocolGame::sendMarketBrowseItem - offer.playerName"); + msg.addString(offer.playerName); } updateCoinBalance(); @@ -5127,7 +5113,7 @@ void ProtocolGame::sendMarketAcceptOffer(const MarketOfferEx &offer) { } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName, "ProtocolGame::sendMarketAcceptOffer - offer.playerName"); + msg.addString(offer.playerName); msg.add(0x00); } else { msg.add(0x00); @@ -5140,7 +5126,7 @@ void ProtocolGame::sendMarketAcceptOffer(const MarketOfferEx &offer) { } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName, "ProtocolGame::sendMarketAcceptOffer - offer.playerName"); + msg.addString(offer.playerName); } writeToOutputBuffer(msg); @@ -5701,7 +5687,7 @@ void ProtocolGame::sendForgeHistory(uint8_t page) { auto action = magic_enum::enum_integer(history.actionType); msg.add(static_cast(history.createdAt)); msg.addByte(action); - msg.addString(history.description, "ProtocolGame::sendForgeHistory - history.description"); + msg.addString(history.description); msg.addByte((history.bonus >= 1 && history.bonus < 8) ? 0x01 : 0x00); } } @@ -5731,7 +5717,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { } if (it.armor != 0) { - msg.addString(std::to_string(it.armor), "ProtocolGame::sendMarketDetail - std::to_string(it.armor)"); + msg.addString(std::to_string(it.armor)); } else { msg.add(0x00); } @@ -5759,21 +5745,21 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { } ss << static_cast(it.shootRange) << " fields"; } - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else if (!it.isRanged() && it.attack != 0) { if (it.abilities && it.abilities->elementType != COMBAT_NONE && it.abilities->elementDamage != 0) { std::ostringstream ss; ss << it.attack << " physical +" << it.abilities->elementDamage << ' ' << getCombatName(it.abilities->elementType); - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else { - msg.addString(std::to_string(it.attack), "ProtocolGame::sendMarketDetail - std::to_string(it.attack)"); + msg.addString(std::to_string(it.attack)); } } else { msg.add(0x00); } if (it.isContainer()) { - msg.addString(std::to_string(it.maxItems), "ProtocolGame::sendMarketDetail - std::to_string(it.maxItems)"); + msg.addString(std::to_string(it.maxItems)); } else { msg.add(0x00); } @@ -5782,9 +5768,9 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.extraDefense != 0) { std::ostringstream ss; ss << it.defense << ' ' << std::showpos << it.extraDefense << std::noshowpos; - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else { - msg.addString(std::to_string(it.defense), "ProtocolGame::sendMarketDetail - std::to_string(it.defense)"); + msg.addString(std::to_string(it.defense)); } } else { msg.add(0x00); @@ -5793,9 +5779,9 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (!it.description.empty()) { const std::string &descr = it.description; if (descr.back() == '.') { - msg.addString(std::string(descr, 0, descr.length() - 1), "ProtocolGame::sendMarketDetail - std::string(descr, 0, descr.length() - 1)"); + msg.addString(std::string(descr, 0, descr.length() - 1)); } else { - msg.addString(descr, "ProtocolGame::sendMarketDetail - descr"); + msg.addString(descr); } } else { msg.add(0x00); @@ -5804,7 +5790,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.decayTime != 0) { std::ostringstream ss; ss << it.decayTime << " seconds"; - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else { msg.add(0x00); } @@ -5827,25 +5813,25 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { ss << fmt::format("{} {:+}%", getCombatName(indexToCombatType(i)), it.abilities->absorbPercent[i]); } - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else { msg.add(0x00); } if (it.minReqLevel != 0) { - msg.addString(std::to_string(it.minReqLevel), "ProtocolGame::sendMarketDetail - std::to_string(it.minReqLevel)"); + msg.addString(std::to_string(it.minReqLevel)); } else { msg.add(0x00); } if (it.minReqMagicLevel != 0) { - msg.addString(std::to_string(it.minReqMagicLevel), "ProtocolGame::sendMarketDetail - std::to_string(it.minReqMagicLevel)"); + msg.addString(std::to_string(it.minReqMagicLevel)); } else { msg.add(0x00); } - msg.addString(it.vocationString, "ProtocolGame::sendMarketDetail - it.vocationString"); - msg.addString(it.runeSpellName, "ProtocolGame::sendMarketDetail - it.runeSpellName"); + msg.addString(it.vocationString); + msg.addString(it.runeSpellName); if (it.abilities) { std::ostringstream ss; @@ -5911,13 +5897,13 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { ss << fmt::format("speed {:+}", (it.abilities->speed >> 1)); } - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else { msg.add(0x00); } if (it.charges != 0) { - msg.addString(std::to_string(it.charges), "ProtocolGame::sendMarketDetail - std::to_string(it.charges)"); + msg.addString(std::to_string(it.charges)); } else { msg.add(0x00); } @@ -5932,7 +5918,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { } } - msg.addString(weaponName, "ProtocolGame::sendMarketDetail - weaponName"); + msg.addString(weaponName); if (it.weight != 0) { std::ostringstream ss; @@ -5946,7 +5932,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { ss << weightString; } ss << " oz"; - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else { msg.add(0x00); } @@ -5954,14 +5940,14 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (!oldProtocol) { std::string augmentsDescription = it.parseAugmentDescription(true); if (!augmentsDescription.empty()) { - msg.addString(augmentsDescription, "ProtocolGame::sendMarketDetail - augmentsDescription"); + msg.addString(augmentsDescription); } else { msg.add(0x00); // no augments } } if (it.imbuementSlot > 0) { - msg.addString(std::to_string(it.imbuementSlot), "ProtocolGame::sendMarketDetail - std::to_string(it.imbuementSlot)"); + msg.addString(std::to_string(it.imbuementSlot)); } else { msg.add(0x00); } @@ -5973,7 +5959,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->magicShieldCapacityFlat > 0) { string.clear(); string << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << " and " << it.abilities->magicShieldCapacityPercent << "%"; - msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); + msg.addString(string.str()); } else { msg.add(0x00); } @@ -5981,7 +5967,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->cleavePercent > 0) { string.clear(); string << it.abilities->cleavePercent << "%"; - msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); + msg.addString(string.str()); } else { msg.add(0x00); } @@ -5989,7 +5975,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->reflectFlat[COMBAT_PHYSICALDAMAGE] > 0) { string.clear(); string << it.abilities->reflectFlat[COMBAT_PHYSICALDAMAGE]; - msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); + msg.addString(string.str()); } else { msg.add(0x00); } @@ -5997,7 +5983,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->perfectShotDamage > 0) { string.clear(); string << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << " at range " << unsigned(it.abilities->perfectShotRange); - msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); + msg.addString(string.str()); } else { msg.add(0x00); } @@ -6015,7 +6001,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { // Upgrade and tier detail modifier if (it.upgradeClassification > 0 && tier > 0) { - msg.addString(std::to_string(it.upgradeClassification), "ProtocolGame::sendMarketDetail - std::to_string(it.upgradeClassification)"); + msg.addString(std::to_string(it.upgradeClassification)); std::ostringstream ss; double chance; @@ -6029,10 +6015,10 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { chance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026; ss << fmt::format("{} ({:.2f}% Ruse)", static_cast(tier), chance); } - msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); + msg.addString(ss.str()); } else if (it.upgradeClassification > 0 && tier == 0) { - msg.addString(std::to_string(it.upgradeClassification), "ProtocolGame::sendMarketDetail - std::to_string(it.upgradeClassification)"); - msg.addString(std::to_string(tier), "ProtocolGame::sendMarketDetail - std::to_string(tier)"); + msg.addString(std::to_string(it.upgradeClassification)); + msg.addString(std::to_string(tier)); } else { msg.add(0x00); msg.add(0x00); @@ -6101,7 +6087,7 @@ void ProtocolGame::sendTradeItemRequest(const std::string &traderName, std::shar msg.addByte(0x7E); } - msg.addString(traderName, "ProtocolGame::sendTradeItemRequest - traderName"); + msg.addString(traderName); if (std::shared_ptr tradeContainer = item->getContainer()) { std::list> listContainer { tradeContainer }; @@ -6166,7 +6152,7 @@ void ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClas static uint32_t statementId = 0; msg.add(++statementId); - msg.addString(creature->getName(), "ProtocolGame::sendCreatureSay - creature->getName()"); + msg.addString(creature->getName()); if (!oldProtocol) { msg.addByte(0x00); // Show (Traded) @@ -6191,7 +6177,7 @@ void ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClas msg.addPosition(creature->getPosition()); } - msg.addString(text, "ProtocolGame::sendCreatureSay - text"); + msg.addString(text); writeToOutputBuffer(msg); } @@ -6213,7 +6199,7 @@ void ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasse } type = TALKTYPE_CHANNEL_R1; } else { - msg.addString(creature->getName(), "ProtocolGame::sendToChannel - creature->getName()"); + msg.addString(creature->getName()); if (!oldProtocol && statementId != 0) { msg.addByte(0x00); // Show (Traded) } @@ -6233,7 +6219,7 @@ void ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasse } msg.add(channelId); - msg.addString(text, "ProtocolGame::sendToChannel - text"); + msg.addString(text); writeToOutputBuffer(msg); } @@ -6243,7 +6229,7 @@ void ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClas static uint32_t statementId = 0; msg.add(++statementId); if (speaker) { - msg.addString(speaker->getName(), "ProtocolGame::sendPrivateMessage - speaker->getName()"); + msg.addString(speaker->getName()); if (!oldProtocol && statementId != 0) { msg.addByte(0x00); // Show (Traded) } @@ -6261,7 +6247,7 @@ void ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClas msg.addByte(type); } - msg.addString(text, "ProtocolGame::sendPrivateMessage - text"); + msg.addString(text); writeToOutputBuffer(msg); } @@ -6349,7 +6335,7 @@ void ProtocolGame::sendRestingStatus(uint8_t protection) { msg.addByte(dailyStreak < 2 ? 0 : 1); if (dailyStreak < 2) { - msg.addString("Resting Area (no active bonus)", "ProtocolGame::sendRestingStatus - Resting Area (no active bonus)"); + msg.addString("Resting Area (no active bonus)"); } else { std::ostringstream ss; ss << "Active Resting Area Bonuses: "; @@ -6372,7 +6358,7 @@ void ProtocolGame::sendRestingStatus(uint8_t protection) { ss << ",\nSoul Points Regeneration"; } ss << "."; - msg.addString(ss.str(), "ProtocolGame::sendRestingStatus - ss.str()"); + msg.addString(ss.str()); } writeToOutputBuffer(msg); } @@ -6568,7 +6554,7 @@ void ProtocolGame::sendPlayerVocation(std::shared_ptr target) { void ProtocolGame::sendFYIBox(const std::string &message) { NetworkMessage msg; msg.addByte(0x15); - msg.addString(message, "ProtocolGame::sendFYIBox - message"); + msg.addString(message); writeToOutputBuffer(msg); } @@ -6748,7 +6734,7 @@ void ProtocolGame::sendAddCreature(std::shared_ptr creature, const Pos msg.addByte(0x00); // can change pvp framing option msg.addByte(0x00); // expert mode button enabled - msg.addString(g_configManager().getString(STORE_IMAGES_URL, __FUNCTION__), "ProtocolGame::sendAddCreature - g_configManager().getString(STORE_IMAGES_URL)"); + msg.addString(g_configManager().getString(STORE_IMAGES_URL, __FUNCTION__)); msg.add(static_cast(g_configManager().getNumber(STORE_COIN_PACKET, __FUNCTION__))); if (!oldProtocol) { @@ -6990,16 +6976,16 @@ void ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr i if (canWrite) { msg.add(maxlen); - msg.addString(item->getAttribute(ItemAttribute_t::TEXT), "ProtocolGame::sendTextWindow - item->getAttribute(ItemAttribute_t::TEXT)"); + msg.addString(item->getAttribute(ItemAttribute_t::TEXT)); } else { const std::string &text = item->getAttribute(ItemAttribute_t::TEXT); msg.add(text.size()); - msg.addString(text, "ProtocolGame::sendTextWindow - text"); + msg.addString(text); } const std::string &writer = item->getAttribute(ItemAttribute_t::WRITER); if (!writer.empty()) { - msg.addString(writer, "ProtocolGame::sendTextWindow - writer"); + msg.addString(writer); } else { msg.add(0x00); } @@ -7010,7 +6996,7 @@ void ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr i auto writtenDate = item->getAttribute(ItemAttribute_t::DATE); if (writtenDate != 0) { - msg.addString(formatDateShort(writtenDate), "ProtocolGame::sendTextWindow - formatDateShort(writtenDate)"); + msg.addString(formatDateShort(writtenDate)); } else { msg.add(0x00); } @@ -7024,7 +7010,7 @@ void ProtocolGame::sendTextWindow(uint32_t windowTextId, uint32_t itemId, const msg.add(windowTextId); AddItem(msg, itemId, 1, 0); msg.add(text.size()); - msg.addString(text, "ProtocolGame::sendTextWindow - text"); + msg.addString(text); msg.add(0x00); if (!oldProtocol) { @@ -7040,7 +7026,7 @@ void ProtocolGame::sendHouseWindow(uint32_t windowTextId, const std::string &tex msg.addByte(0x97); msg.addByte(0x00); msg.add(windowTextId); - msg.addString(text, "ProtocolGame::sendHouseWindow - text"); + msg.addString(text); writeToOutputBuffer(msg); } @@ -7084,7 +7070,7 @@ void ProtocolGame::sendOutfitWindow() { msg.addByte(protocolOutfits.size()); for (const ProtocolOutfit &outfit : protocolOutfits) { msg.add(outfit.lookType); - msg.addString(outfit.name, "ProtocolGame::sendOutfitWindow - outfit.name"); + msg.addString(outfit.name); msg.addByte(outfit.addons); } @@ -7098,7 +7084,7 @@ void ProtocolGame::sendOutfitWindow() { msg.addByte(mounts.size()); for (const auto &mount : mounts) { msg.add(mount->clientId); - msg.addString(mount->name, "ProtocolGame::sendOutfitWindow - mount->name"); + msg.addString(mount->name); } writeToOutputBuffer(msg); @@ -7119,19 +7105,19 @@ void ProtocolGame::sendOutfitWindow() { if (player->isAccessPlayer() && g_configManager().getBoolean(ENABLE_SUPPORT_OUTFIT, __FUNCTION__)) { msg.add(75); - msg.addString("Gamemaster", "ProtocolGame::sendOutfitWindow - Gamemaster"); + msg.addString("Gamemaster"); msg.addByte(0); msg.addByte(0x00); ++outfitSize; msg.add(266); - msg.addString("Customer Support", "ProtocolGame::sendOutfitWindow - Customer Support"); + msg.addString("Customer Support"); msg.addByte(0); msg.addByte(0x00); ++outfitSize; msg.add(302); - msg.addString("Community Manager", "ProtocolGame::sendOutfitWindow - Community Manager"); + msg.addString("Community Manager"); msg.addByte(0); msg.addByte(0x00); ++outfitSize; @@ -7143,14 +7129,14 @@ void ProtocolGame::sendOutfitWindow() { uint8_t addons; if (player->getOutfitAddons(outfit, addons)) { msg.add(outfit->lookType); - msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); + msg.addString(outfit->name); msg.addByte(addons); msg.addByte(0x00); ++outfitSize; } else if (outfit->lookType == 1210 || outfit->lookType == 1211) { if (player->canWear(1210, 0) || player->canWear(1211, 0)) { msg.add(outfit->lookType); - msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); + msg.addString(outfit->name); msg.addByte(3); msg.addByte(0x02); ++outfitSize; @@ -7158,14 +7144,14 @@ void ProtocolGame::sendOutfitWindow() { } else if (outfit->lookType == 1456 || outfit->lookType == 1457) { if (player->canWear(1456, 0) || player->canWear(1457, 0)) { msg.add(outfit->lookType); - msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); + msg.addString(outfit->name); msg.addByte(3); msg.addByte(0x03); ++outfitSize; } } else if (outfit->from == "store") { msg.add(outfit->lookType); - msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); + msg.addString(outfit->name); msg.addByte(outfit->lookType >= 962 && outfit->lookType <= 975 ? 0 : 3); msg.addByte(0x01); msg.add(0x00); @@ -7191,12 +7177,12 @@ void ProtocolGame::sendOutfitWindow() { for (const auto &mount : mounts) { if (player->hasMount(mount)) { msg.add(mount->clientId); - msg.addString(mount->name, "ProtocolGame::sendOutfitWindow - mount->name"); + msg.addString(mount->name); msg.addByte(0x00); ++mountSize; } else if (mount->type == "store") { msg.add(mount->clientId); - msg.addString(mount->name, "ProtocolGame::sendOutfitWindow - mount->name"); + msg.addString(mount->name); msg.addByte(0x01); msg.add(0x00); ++mountSize; @@ -7225,7 +7211,7 @@ void ProtocolGame::sendOutfitWindow() { } msg.add(familiar->lookType); - msg.addString(familiar->name, "ProtocolGame::sendOutfitWindow - familiar.name"); + msg.addString(familiar->name); msg.addByte(0x00); if (++familiarSize == limitFamiliars) { break; @@ -7289,7 +7275,7 @@ void ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position } msg.add(outfit->lookType); - msg.addString(outfit->name, "ProtocolGame::sendPodiumWindow - outfit->name"); + msg.addString(outfit->name); msg.addByte(addons); msg.addByte(0x00); if (++outfitSize == limitOutfits) { @@ -7311,7 +7297,7 @@ void ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position for (const auto &mount : mounts) { if (player->hasMount(mount)) { msg.add(mount->clientId); - msg.addString(mount->name, "ProtocolGame::sendPodiumWindow - mount->name"); + msg.addString(mount->name); msg.addByte(0x00); if (++mountSize == limitMounts) { break; @@ -7361,8 +7347,8 @@ void ProtocolGame::sendVIP(uint32_t guid, const std::string &name, const std::st NetworkMessage msg; msg.addByte(0xD2); msg.add(guid); - msg.addString(name, "ProtocolGame::sendVIP - name"); - msg.addString(description, "ProtocolGame::sendVIP - description"); + msg.addString(name); + msg.addString(description); msg.add(std::min(10, icon)); msg.addByte(notify ? 0x01 : 0x00); msg.addByte(enumToValue(status)); @@ -7391,7 +7377,7 @@ void ProtocolGame::sendVIPGroups() { msg.addByte(vipGroups.size()); // vipGroups.size() for (const auto &vipGroup : vipGroups) { msg.addByte(vipGroup->id); - msg.addString(vipGroup->name, "ProtocolGame::sendVIP - vipGroup.name"); + msg.addString(vipGroup->name); msg.addByte(vipGroup->customizable ? 0x01 : 0x00); // 0x00 = not Customizable, 0x01 = Customizable } msg.addByte(player->vip()->getMaxGroupEntries() - vipGroups.size()); // max vip groups @@ -7486,7 +7472,7 @@ void ProtocolGame::sendPreyData(const std::unique_ptr &slot) { // Empty } else if (slot->state == PreyDataState_Active) { if (const auto mtype = g_monsters().getMonsterTypeByRaceId(slot->selectedRaceId)) { - msg.addString(mtype->name, "ProtocolGame::sendPreyData - mtype->name"); + msg.addString(mtype->name); const Outfit_t outfit = mtype->info.outfit; msg.add(outfit.lookType); if (outfit.lookType == 0) { @@ -7512,7 +7498,7 @@ void ProtocolGame::sendPreyData(const std::unique_ptr &slot) { continue; } - msg.addString(mtype->name, "ProtocolGame::sendPreyData - mtype->name"); + msg.addString(mtype->name); const Outfit_t outfit = mtype->info.outfit; msg.add(outfit.lookType); if (outfit.lookType == 0) { @@ -7537,7 +7523,7 @@ void ProtocolGame::sendPreyData(const std::unique_ptr &slot) { continue; } - msg.addString(mtype->name, "ProtocolGame::sendPreyData - mtype->name"); + msg.addString(mtype->name); const Outfit_t outfit = mtype->info.outfit; msg.add(outfit.lookType); if (outfit.lookType == 0) { @@ -7605,18 +7591,18 @@ void ProtocolGame::sendModalWindow(const ModalWindow &modalWindow) { msg.addByte(0xFA); msg.add(modalWindow.id); - msg.addString(modalWindow.title, "ProtocolGame::sendModalWindow - modalWindow.title"); - msg.addString(modalWindow.message, "ProtocolGame::sendModalWindow - modalWindow.message"); + msg.addString(modalWindow.title); + msg.addString(modalWindow.message); msg.addByte(modalWindow.buttons.size()); for (const auto &it : modalWindow.buttons) { - msg.addString(it.first, "ProtocolGame::sendModalWindow - it.first"); + msg.addString(it.first); msg.addByte(it.second); } msg.addByte(modalWindow.choices.size()); for (const auto &it : modalWindow.choices) { - msg.addString(it.first, "ProtocolGame::sendModalWindow - it.first"); + msg.addString(it.first); msg.addByte(it.second); } @@ -7656,7 +7642,7 @@ void ProtocolGame::AddCreature(NetworkMessage &msg, std::shared_ptr cr if (!oldProtocol && creature->isHealthHidden()) { msg.addString(std::string()); } else { - msg.addString(creature->getName(), "ProtocolGame::AddCreature - creature->getName()"); + msg.addString(creature->getName()); } } @@ -7875,10 +7861,9 @@ void ProtocolGame::addImbuementInfo(NetworkMessage &msg, uint16_t imbuementId) c const CategoryImbuement* categoryImbuement = g_imbuements().getCategoryByID(imbuement->getCategory()); msg.add(imbuementId); - msg.addString(baseImbuement->name + " " + imbuement->getName(), "ProtocolGame::addImbuementInfo - baseImbuement->name + " - " + imbuement->getName()"); - msg.addString(imbuement->getDescription(), "ProtocolGame::addImbuementInfo - imbuement->getDescription()"); - msg.addString(categoryImbuement->name + imbuement->getSubGroup(), "ProtocolGame::addImbuementInfo - categoryImbuement->name + imbuement->getSubGroup()"); + msg.addString(baseImbuement->name + " " + imbuement->getName()); + msg.addString(imbuement->getDescription()); + msg.addString(categoryImbuement->name + imbuement->getSubGroup()); msg.add(imbuement->getIconID()); msg.add(baseImbuement->duration); @@ -7891,7 +7876,7 @@ void ProtocolGame::addImbuementInfo(NetworkMessage &msg, uint16_t imbuementId) c for (const auto &itm : items) { const ItemType &it = Item::items[itm.first]; msg.add(itm.first); - msg.addString(it.name, "ProtocolGame::addImbuementInfo - it.name"); + msg.addString(it.name); msg.add(itm.second); } @@ -7963,7 +7948,7 @@ void ProtocolGame::sendMessageDialog(const std::string &message) { NetworkMessage msg; msg.addByte(0xED); msg.addByte(0x14); // Unknown type - msg.addString(message, "ProtocolGame::sendMessageDialog - message"); + msg.addString(message); writeToOutputBuffer(msg); } @@ -7971,7 +7956,7 @@ void ProtocolGame::sendImbuementResult(const std::string message) { NetworkMessage msg; msg.addByte(0xED); msg.addByte(0x01); - msg.addString(message, "ProtocolGame::sendImbuementResult - message"); + msg.addString(message); writeToOutputBuffer(msg); } @@ -8032,7 +8017,7 @@ void ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party msg.addByte(static_cast(party->membersData.size())); for (const std::shared_ptr &analyzer : party->membersData) { msg.add(analyzer->id); - msg.addString(analyzer->name, "ProtocolGame::updatePartyTrackerAnalyzer - analyzer->name"); + msg.addString(analyzer->name); } } @@ -8068,7 +8053,7 @@ void ProtocolGame::sendKillTrackerUpdate(std::shared_ptr corpse, cons NetworkMessage msg; msg.addByte(0xD1); - msg.addString(name, "ProtocolGame::sendKillTrackerUpdate - name"); + msg.addString(name); msg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21); msg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00); msg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00); @@ -8136,7 +8121,7 @@ void ProtocolGame::sendUpdateInputAnalyzer(CombatType_t type, int32_t amount, st msg.addByte(ANALYZER_DAMAGE_RECEIVED); msg.add(amount); msg.addByte(clientElement); - msg.addString(target, "ProtocolGame::sendUpdateInputAnalyzer - target"); + msg.addString(target); writeToOutputBuffer(msg); } @@ -8323,9 +8308,9 @@ void ProtocolGame::AddShopItem(NetworkMessage &msg, const ShopBlock &shopBlock) // If not send "itemName" variable from the npc shop, will registered the name that is in items.xml if (shopBlock.itemName.empty()) { - msg.addString(it.name, "ProtocolGame::AddShopItem - it.name"); + msg.addString(it.name); } else { - msg.addString(shopBlock.itemName, "ProtocolGame::AddShopItem - shopBlock.itemName"); + msg.addString(shopBlock.itemName); } msg.add(it.weight); msg.add(shopBlock.itemBuyPrice == 4294967295 ? 0 : shopBlock.itemBuyPrice); @@ -8407,8 +8392,7 @@ void ProtocolGame::sendInventoryImbuements(const std::mapgetBaseID()); msg.addByte(0x01); - msg.addString(baseImbuement->name + " " + imbuement->getName(), "ProtocolGame::sendInventoryImbuements - baseImbuement->name + " - " + imbuement->getName()"); + msg.addString(baseImbuement->name + " " + imbuement->getName()); msg.add(imbuement->getIconID()); msg.add(imbuementInfo.duration); @@ -9007,9 +8991,9 @@ void ProtocolGame::sendPodiumDetails(NetworkMessage &msg, const std::vectorname, "ProtocolGame::sendPodiumDetails - mType->name"); + msg.addString(mType->name); } msg.add(monsterOutfit.lookType); if (isLookType) { diff --git a/src/server/network/protocol/protocolgame.hpp b/src/server/network/protocol/protocolgame.hpp index 2a5fde6c6c4..769771c975a 100644 --- a/src/server/network/protocol/protocolgame.hpp +++ b/src/server/network/protocol/protocolgame.hpp @@ -143,7 +143,7 @@ class ProtocolGame final : public Protocol { void parseGreet(NetworkMessage &msg); void parseBugReport(NetworkMessage &msg); - void parseDebugAssert(NetworkMessage &msg); + void parseOfferDescription(NetworkMessage &msg); void parsePreyAction(NetworkMessage &msg); void parseSendResourceBalance(); void parseRuleViolationReport(NetworkMessage &msg); diff --git a/src/server/network/protocol/protocollogin.cpp b/src/server/network/protocol/protocollogin.cpp index f8c68634f64..9cf6cc1c370 100644 --- a/src/server/network/protocol/protocollogin.cpp +++ b/src/server/network/protocol/protocollogin.cpp @@ -23,7 +23,7 @@ void ProtocolLogin::disconnectClient(const std::string &message) { auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x0B); - output->addString(message, "ProtocolLogin::disconnectClient - message"); + output->addString(message); send(output); disconnect(); @@ -57,12 +57,12 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const std::ostringstream ss; ss << g_game().getMotdNum() << "\n" << motd; - output->addString(ss.str(), "ProtocolLogin::getCharacterList - ss.str()"); + output->addString(ss.str()); } // Add session key output->addByte(0x28); - output->addString(accountDescriptor + "\n" + password, "ProtocolLogin::getCharacterList - accountDescriptor + password"); + output->addString(accountDescriptor + "\n" + password); // Add char list auto [players, result] = account.getAccountPlayers(); @@ -75,8 +75,8 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const output->addByte(1); // number of worlds output->addByte(0); // world id - output->addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolLogin::getCharacterList - _configManager().getString(SERVER_NAME)"); - output->addString(g_configManager().getString(IP, __FUNCTION__), "ProtocolLogin::getCharacterList - g_configManager().getString(IP)"); + output->addString(g_configManager().getString(SERVER_NAME, __FUNCTION__)); + output->addString(g_configManager().getString(IP, __FUNCTION__)); output->add(g_configManager().getNumber(GAME_PORT, __FUNCTION__)); @@ -86,7 +86,7 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const output->addByte(size); for (const auto &[name, deletion] : players) { output->addByte(0); - output->addString(name, "ProtocolLogin::getCharacterList - name"); + output->addString(name); } // Get premium days, check is premium and get lastday diff --git a/src/server/network/protocol/protocolstatus.cpp b/src/server/network/protocol/protocolstatus.cpp index f9ec878eda9..1e7e68e1542 100644 --- a/src/server/network/protocol/protocolstatus.cpp +++ b/src/server/network/protocol/protocolstatus.cpp @@ -167,22 +167,22 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact if (requestedInfo & REQUEST_BASIC_SERVER_INFO) { output->addByte(0x10); - output->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(stringConfig_t::SERVER_NAME)"); - output->addString(g_configManager().getString(IP, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(IP)"); - output->addString(std::to_string(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__)), "ProtocolStatus::sendInfo - std::to_string(g_configManager().getNumber(LOGIN_PORT))"); + output->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__)); + output->addString(g_configManager().getString(IP, __FUNCTION__)); + output->addString(std::to_string(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__))); } if (requestedInfo & REQUEST_OWNER_SERVER_INFO) { output->addByte(0x11); - output->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(OWNER_NAME)"); - output->addString(g_configManager().getString(OWNER_EMAIL, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(OWNER_EMAIL)"); + output->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__)); + output->addString(g_configManager().getString(OWNER_EMAIL, __FUNCTION__)); } if (requestedInfo & REQUEST_MISC_SERVER_INFO) { output->addByte(0x12); - output->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(SERVER_MOTD)"); - output->addString(g_configManager().getString(LOCATION, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(LOCATION)"); - output->addString(g_configManager().getString(URL, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(URL)"); + output->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__)); + output->addString(g_configManager().getString(LOCATION, __FUNCTION__)); + output->addString(g_configManager().getString(URL, __FUNCTION__)); output->add((OTSYS_TIME() - ProtocolStatus::start) / 1000); } @@ -195,8 +195,8 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact if (requestedInfo & REQUEST_MAP_INFO) { output->addByte(0x30); - output->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)"); - output->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)"); + output->addString(g_configManager().getString(MAP_NAME, __FUNCTION__)); + output->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__)); uint32_t mapWidth, mapHeight; g_game().getMapDimensions(mapWidth, mapHeight); output->add(mapWidth); @@ -209,7 +209,7 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact const auto players = g_game().getPlayers(); output->add(players.size()); for (const auto &it : players) { - output->addString(it.second->getName(), "ProtocolStatus::sendInfo - it.second->getName()"); + output->addString(it.second->getName()); output->add(it.second->getLevel()); } } @@ -225,9 +225,9 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact if (requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) { output->addByte(0x23); // server software info - output->addString(ProtocolStatus::SERVER_NAME, "ProtocolStatus::sendInfo - ProtocolStatus::SERVER_NAME"); - output->addString(ProtocolStatus::SERVER_VERSION, "ProtocolStatus::sendInfo - ProtocolStatus::SERVER_VERSION)"); - output->addString(fmt::format("{}.{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER), "ProtocolStatus::sendInfo - fmt::format(CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER)"); + output->addString(ProtocolStatus::SERVER_NAME); + output->addString(ProtocolStatus::SERVER_VERSION); + output->addString(fmt::format("{}.{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER)); } send(output); disconnect(); diff --git a/src/utils/const.hpp b/src/utils/const.hpp index c3f82df7ff7..4cc296e4a7e 100644 --- a/src/utils/const.hpp +++ b/src/utils/const.hpp @@ -35,6 +35,8 @@ static constexpr int32_t STORAGEVALUE_HAZARDCOUNT = 112550; // Wheel of destiny static constexpr int32_t STORAGEVALUE_GIFT_OF_LIFE_COOLDOWN_WOD = 43200; +constexpr double SCALING_BASE = 10.0; + // Reserved player storage key ranges; // [10000000 - 20000000]; static constexpr int32_t PSTRG_RESERVED_RANGE_START = 10000000; diff --git a/tests/build_and_run.sh b/tests/build_and_run.sh index 3d5531ebf0b..ac4ccad512c 100755 --- a/tests/build_and_run.sh +++ b/tests/build_and_run.sh @@ -3,10 +3,12 @@ docker-compose down --rmi all -v --remove-orphans docker-compose up --build -d cd .. -mkdir build -cd build -cmake -DPACKAGE_TESTS=On .. ; make -j`nproc` -./tests/canary_unittest --reporter compact --success -d yes +if [ ! -d "build" ]; then + mkdir build +fi +cd build || exit +cmake -DCMAKE_BUILD_TYPE=Debug -DPACKAGE_TESTS=On .. ; make -j"$(nproc)" +./tests/unit/canary_ut --reporter compact --success cd .. -cd tests +cd tests || exit docker-compose down --rmi all -v --remove-orphans diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 8d234a676a2..5da4ec590ce 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -4,4 +4,5 @@ add_subdirectory(account) add_subdirectory(kv) add_subdirectory(lib) add_subdirectory(security) +add_subdirectory(server) add_subdirectory(utils) diff --git a/tests/unit/server/CMakeLists.txt b/tests/unit/server/CMakeLists.txt new file mode 100644 index 00000000000..ec98d50a3f9 --- /dev/null +++ b/tests/unit/server/CMakeLists.txt @@ -0,0 +1,3 @@ +target_sources(canary_ut PRIVATE + network/message/networkmessage_test.cpp +) diff --git a/tests/unit/server/network/message/networkmessage_test.cpp b/tests/unit/server/network/message/networkmessage_test.cpp new file mode 100644 index 00000000000..f1ec904a3bf --- /dev/null +++ b/tests/unit/server/network/message/networkmessage_test.cpp @@ -0,0 +1,144 @@ +#include "pch.hpp" + +#include + +#include "lib/logging/in_memory_logger.hpp" + +#include "server/network/message/networkmessage.hpp" +#include "utils/tools.hpp" + +using namespace boost::ut; + +// Define a test suite for NetworkMessage +suite<"networkmessage"> networkMessageTest = [] { + di::extension::injector<> injector {}; + DI::setTestContainer(&InMemoryLogger::install(injector)); + auto& logger = dynamic_cast(injector.create()); + + test("NetworkMessage::addByte and getByte") = [&]() { + NetworkMessage msg; + uint8_t byteToAdd = 100; + msg.addByte(byteToAdd); + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + auto byte = msg.getByte(); + expect(eq(byte, byteToAdd)) << "Expected: " << byteToAdd << ", Got: " << byte; + }; + + test("NetworkMessage::addString and getString") = [&]() { + NetworkMessage msg; + std::string testStr = "TestString"; + msg.addString(testStr); + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + std::string retrievedStr = msg.getString(); + expect(eq(retrievedStr, testStr)) << "Expected: \"" << testStr << "\", Got: \"" << retrievedStr << "\""; + }; + + test("NetworkMessage::addString should handle empty string") = [&]() { + NetworkMessage msg; + msg.addString(""); + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + expect(eq(msg.getString(), std::string {})) << "Expected to retrieve an empty string"; + }; + + test("NetworkMessage::addString should fail with oversized string") = [&]() { + NetworkMessage msg; + std::string oversizedString(NETWORKMESSAGE_MAXSIZE + 1, 'a'); + msg.addString(oversizedString); + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + expect(eq(msg.getString(), std::string {})) << "Expected to retrieve an empty string due to oversized input"; + }; + + test("NetworkMessage::canAdd should return false when exceeding max size") = [&]() { + NetworkMessage msg; + expect(not msg.canAdd(NETWORKMESSAGE_MAXSIZE)) << "Should have enough space in buffer"; + expect(not msg.canAdd(NETWORKMESSAGE_MAXSIZE + 1)) << "Should not be able to add data exceeding the max buffer size"; + }; + + test("NetworkMessage::addDouble and getDouble") = [&]() { + NetworkMessage msg; + double testValue = 123.123; + uint8_t precision = 3; + msg.addDouble(testValue, precision); + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + double retrievedValue = msg.getDouble(); + expect(abs(retrievedValue - testValue) < 1e-6) << "Expected: " << testValue << ", Got: " << retrievedValue; + }; + + test("NetworkMessage::addPosition and getPosition") = [&]() { + NetworkMessage msg; + Position pos { 100, 200, 7 }; + msg.addPosition(pos); + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + Position retrievedPos = msg.getPosition(); + expect(eq(retrievedPos, pos)) << "Expected to retrieve the same position values"; + }; + + test("NetworkMessage::reset should clear buffer") = [&]() { + NetworkMessage msg; + msg.addByte(0x64); + msg.reset(); + expect(eq(msg.getLength(), 0)) << "Expected the message length to be zero after reset"; + }; + + test("NetworkMessage::append should merge messages correctly") = [&]() { + NetworkMessage msg1, msg2; + + // Adding initial byte and string to msg1 + msg1.addByte(1); // Byte value 1 + msg1.addString("Hello"); // String value "Hello" + // Adding initial byte and string to msg2 + msg2.addByte(2); // Byte value 2 + msg2.addString("World"); // String value "World" + // Append msg2 to msg1 + msg1.append(msg2); + msg1.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); // Reset read position to start + // Verify the first byte (msg1) + uint8_t byte1 = msg1.getByte(); + expect(eq(byte1, 1)) << "Expected the first byte of the first message (1)"; + // Verify the first string (msg1) + std::string str1 = msg1.getString(); + expect(eq(str1, std::string("Hello"))) << "Expected the first string of the first message"; + // Verify the second byte (msg2) + uint8_t byte2 = msg1.getByte(); + expect(eq(byte2, 2)) << "Expected the first byte of the second message (2)"; + // Verify the second string (msg2) + std::string str2 = msg1.getString(); + expect(eq(str2, std::string("World"))) << "Expected the first string of the second message"; + }; + + test("NetworkMessage::getString should handle out-of-bounds access safely") = [&]() { + NetworkMessage msg; + std::string testStr = "Short"; + msg.addString(testStr); + + // Move the position to simulate incomplete data read + msg.setBufferPosition(msg.getBufferPosition() + 10); + expect(eq(msg.getString(), std::string {})) << "Expected empty string due to out-of-bounds access"; + }; + + test("NetworkMessage::decodeHeader should correctly decode the header") = [&]() { + NetworkMessage msg; + msg.addByte(0x12); + msg.addByte(0x34); + + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + int32_t header = msg.decodeHeader(); + expect(eq(header, 0x3412)) << "Expected header to be decoded correctly"; + }; + + test("NetworkMessage::addBytes and validate content") = [&]() { + NetworkMessage msg; + std::string testData = "testBytes"; + + // Add bytes to the buffer + msg.addBytes(testData.data(), testData.size()); + // Set buffer position to the initial position for reading the added data + msg.setBufferPosition(NetworkMessage::INITIAL_BUFFER_POSITION); + // Verify the content of the buffer before extracting the data + auto buffer = msg.getBuffer(); + std::string extractedData(buffer + NetworkMessage::INITIAL_BUFFER_POSITION, + buffer + NetworkMessage::INITIAL_BUFFER_POSITION + testData.size()); + // Check if the extracted data matches the added data + expect(eq(extractedData, testData)) << "Expected the same bytes added"; + }; +}; From 899c1eb9e474bcaa9219510612c54eaaf38734d4 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sun, 29 Sep 2024 13:32:05 -0300 Subject: [PATCH 12/29] fix: player lose items with wrong loading offline informations (#2919) When the player is offline, in some scenarios the empty items would load and the items would be overlapped with the empty table of the offline player. Resolves #2917 Related to: https://github.com/opentibiabr/canary/pull/2910 --- .../players/cyclopedia/player_badge.cpp | 2 +- src/game/game.cpp | 10 ++- src/io/functions/iologindata_load_player.cpp | 63 ++++++++++--------- src/io/functions/iologindata_load_player.hpp | 2 +- src/io/iologindata.cpp | 20 +++--- src/io/iologindata.hpp | 6 +- 6 files changed, 53 insertions(+), 50 deletions(-) diff --git a/src/creatures/players/cyclopedia/player_badge.cpp b/src/creatures/players/cyclopedia/player_badge.cpp index 639640b2ffe..5f78c1a2e3c 100644 --- a/src/creatures/players/cyclopedia/player_badge.cpp +++ b/src/creatures/players/cyclopedia/player_badge.cpp @@ -116,7 +116,7 @@ bool PlayerBadge::loyalty(uint8_t amount) { } bool PlayerBadge::accountAllLevel(uint8_t amount) { - const auto &players = g_game().getPlayersByAccount(m_player.getAccount(), true); + auto players = g_game().getPlayersByAccount(m_player.getAccount(), true); uint16_t total = std::accumulate(players.begin(), players.end(), 0, [](uint16_t sum, const std::shared_ptr &player) { return sum + player->getLevel(); }); diff --git a/src/game/game.cpp b/src/game/game.cpp index 3a579ec2fdf..77dffe532f0 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1014,8 +1014,9 @@ std::shared_ptr Game::getPlayerByGUID(const uint32_t &guid, bool allowOf if (!allowOffline) { return nullptr; } + std::shared_ptr tmpPlayer = std::make_shared(nullptr); - if (!IOLoginData::loadPlayerById(tmpPlayer, guid)) { + if (!IOLoginData::loadPlayerById(tmpPlayer, guid, false)) { return nullptr; } tmpPlayer->setOnline(false); @@ -1029,7 +1030,9 @@ std::string Game::getPlayerNameByGUID(const uint32_t &guid) { if (m_playerNameCache.contains(guid)) { return m_playerNameCache.at(guid); } - auto player = getPlayerByGUID(guid, true); + + // This player need read-only purposes and never saved + const auto &player = getPlayerByGUID(guid, true); auto name = player ? player->getName() : ""; if (!name.empty()) { m_playerNameCache[guid] = name; @@ -1068,9 +1071,10 @@ std::vector> Game::getPlayersByAccount(std::shared_ptr> ret; for (const auto &[name, _] : accountPlayers) { - auto player = getPlayerByName(name, allowOffline); + const auto &player = getPlayerByName(name, allowOffline); if (player) { ret.push_back(player); } diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp index 63ca7939c46..66be7927692 100644 --- a/src/io/functions/iologindata_load_player.cpp +++ b/src/io/functions/iologindata_load_player.cpp @@ -105,9 +105,9 @@ bool IOLoginDataLoad::preLoadPlayer(std::shared_ptr player, const std::s return true; } -bool IOLoginDataLoad::loadPlayerFirst(std::shared_ptr player, DBResult_ptr result) { +bool IOLoginDataLoad::loadPlayerBasicInfo(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return false; } @@ -184,12 +184,15 @@ bool IOLoginDataLoad::loadPlayerFirst(std::shared_ptr player, DBResult_p player->setMaxManaShield(result->getNumber("max_manashield")); player->setMarriageSpouse(result->getNumber("marriage_spouse")); + + // Experience load + IOLoginDataLoad::loadPlayerExperience(player, result); return true; } void IOLoginDataLoad::loadPlayerExperience(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -212,7 +215,7 @@ void IOLoginDataLoad::loadPlayerExperience(std::shared_ptr player, DBRes void IOLoginDataLoad::loadPlayerBlessings(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -223,7 +226,7 @@ void IOLoginDataLoad::loadPlayerBlessings(std::shared_ptr player, DBResu void IOLoginDataLoad::loadPlayerConditions(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -243,13 +246,13 @@ void IOLoginDataLoad::loadPlayerConditions(std::shared_ptr player, DBRes void IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } player->defaultOutfit.lookType = result->getNumber("looktype"); if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && player->defaultOutfit.lookType != 0 && !g_game().isLookTypeRegistered(player->defaultOutfit.lookType)) { - g_logger().warn("[IOLoginData::loadPlayer] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", player->defaultOutfit.lookType); + g_logger().warn("[{}] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", __FUNCTION__, player->defaultOutfit.lookType); return; } @@ -265,7 +268,7 @@ void IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DB player->defaultOutfit.lookFamiliarsType = result->getNumber("lookfamiliarstype"); if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && player->defaultOutfit.lookFamiliarsType != 0 && !g_game().isLookTypeRegistered(player->defaultOutfit.lookFamiliarsType)) { - g_logger().warn("[IOLoginData::loadPlayer] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", player->defaultOutfit.lookFamiliarsType); + g_logger().warn("[{}] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", __FUNCTION__, player->defaultOutfit.lookFamiliarsType); return; } @@ -274,7 +277,7 @@ void IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DB void IOLoginDataLoad::loadPlayerSkullSystem(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -296,7 +299,7 @@ void IOLoginDataLoad::loadPlayerSkullSystem(std::shared_ptr player, DBRe void IOLoginDataLoad::loadPlayerSkill(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -318,7 +321,7 @@ void IOLoginDataLoad::loadPlayerSkill(std::shared_ptr player, DBResult_p void IOLoginDataLoad::loadPlayerKills(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -337,7 +340,7 @@ void IOLoginDataLoad::loadPlayerKills(std::shared_ptr player, DBResult_p void IOLoginDataLoad::loadPlayerGuild(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -387,7 +390,7 @@ void IOLoginDataLoad::loadPlayerGuild(std::shared_ptr player, DBResult_p void IOLoginDataLoad::loadPlayerStashItems(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -403,7 +406,7 @@ void IOLoginDataLoad::loadPlayerStashItems(std::shared_ptr player, DBRes void IOLoginDataLoad::loadPlayerBestiaryCharms(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -456,7 +459,7 @@ void IOLoginDataLoad::loadPlayerBestiaryCharms(std::shared_ptr player, D void IOLoginDataLoad::loadPlayerInstantSpellList(std::shared_ptr player, DBResult_ptr result) { if (!player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player nullptr", __FUNCTION__); return; } @@ -472,7 +475,7 @@ void IOLoginDataLoad::loadPlayerInstantSpellList(std::shared_ptr player, void IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -554,7 +557,7 @@ void IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, D void IOLoginDataLoad::loadPlayerStoreInbox(std::shared_ptr player) { if (!player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player nullptr", __FUNCTION__); return; } @@ -565,7 +568,7 @@ void IOLoginDataLoad::loadPlayerStoreInbox(std::shared_ptr player) { void IOLoginDataLoad::loadRewardItems(std::shared_ptr player) { if (!player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player nullptr", __FUNCTION__); return; } @@ -583,7 +586,7 @@ void IOLoginDataLoad::loadRewardItems(std::shared_ptr player) { void IOLoginDataLoad::loadPlayerDepotItems(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -622,7 +625,7 @@ void IOLoginDataLoad::loadPlayerDepotItems(std::shared_ptr player, DBRes void IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -658,7 +661,7 @@ void IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBRes void IOLoginDataLoad::loadPlayerStorageMap(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -674,7 +677,7 @@ void IOLoginDataLoad::loadPlayerStorageMap(std::shared_ptr player, DBRes void IOLoginDataLoad::loadPlayerVip(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -712,7 +715,7 @@ void IOLoginDataLoad::loadPlayerVip(std::shared_ptr player, DBResult_ptr void IOLoginDataLoad::loadPlayerPreyClass(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -759,7 +762,7 @@ void IOLoginDataLoad::loadPlayerPreyClass(std::shared_ptr player, DBResu void IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -809,7 +812,7 @@ void IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, void IOLoginDataLoad::loadPlayerForgeHistory(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player or Result nullptr", __FUNCTION__); return; } @@ -830,12 +833,12 @@ void IOLoginDataLoad::loadPlayerForgeHistory(std::shared_ptr player, DBR void IOLoginDataLoad::loadPlayerBosstiary(std::shared_ptr player, DBResult_ptr result) { if (!result) { - g_logger().warn("[IOLoginData::loadPlayer] - Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Result nullptr", __FUNCTION__); return; } if (!player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player or Result nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player nullptr", __FUNCTION__); return; } @@ -867,7 +870,7 @@ void IOLoginDataLoad::loadPlayerBosstiary(std::shared_ptr player, DBResu void IOLoginDataLoad::bindRewardBag(std::shared_ptr player, ItemsMap &rewardItemsMap) { if (!player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player nullptr", __FUNCTION__); return; } @@ -907,7 +910,7 @@ void IOLoginDataLoad::insertItemsIntoRewardBag(const ItemsMap &rewardItemsMap) { void IOLoginDataLoad::loadPlayerInitializeSystem(std::shared_ptr player) { if (!player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player nullptr", __FUNCTION__); return; } @@ -926,7 +929,7 @@ void IOLoginDataLoad::loadPlayerInitializeSystem(std::shared_ptr player) void IOLoginDataLoad::loadPlayerUpdateSystem(std::shared_ptr player) { if (!player) { - g_logger().warn("[IOLoginData::loadPlayer] - Player nullptr: {}", __FUNCTION__); + g_logger().warn("[{}] - Player nullptr", __FUNCTION__); return; } diff --git a/src/io/functions/iologindata_load_player.hpp b/src/io/functions/iologindata_load_player.hpp index 07a478d2dc3..e67faf4d8c1 100644 --- a/src/io/functions/iologindata_load_player.hpp +++ b/src/io/functions/iologindata_load_player.hpp @@ -13,7 +13,7 @@ class IOLoginDataLoad : public IOLoginData { public: - static bool loadPlayerFirst(std::shared_ptr player, DBResult_ptr result); + static bool loadPlayerBasicInfo(std::shared_ptr player, DBResult_ptr result); static bool preLoadPlayer(std::shared_ptr player, const std::string &name); static void loadPlayerExperience(std::shared_ptr player, DBResult_ptr result); static void loadPlayerBlessings(std::shared_ptr player, DBResult_ptr result); diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index 41f8cea8985..de445bb70f8 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -94,22 +94,22 @@ void IOLoginData::updateOnlineStatus(uint32_t guid, bool login) { Database::getInstance().executeQuery(query.str()); } -// The boolean "disableIrrelevantInfo" will deactivate the loading of information that is not relevant to the preload, for example, forge, bosstiary, etc. None of this we need to access if the player is offline -bool IOLoginData::loadPlayerById(std::shared_ptr player, uint32_t id, bool disableIrrelevantInfo /* = true*/) { +// The boolean "loadBasicInfoOnly" will deactivate the loading of information that is not relevant to the preload, for example, forge, bosstiary, etc. None of this we need to access if the player is offline +bool IOLoginData::loadPlayerById(std::shared_ptr player, uint32_t id, bool loadBasicInfoOnly /* = true*/) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `players` WHERE `id` = " << id; - return loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo); + return loadPlayer(player, db.storeQuery(query.str()), loadBasicInfoOnly); } -bool IOLoginData::loadPlayerByName(std::shared_ptr player, const std::string &name, bool disableIrrelevantInfo /* = true*/) { +bool IOLoginData::loadPlayerByName(std::shared_ptr player, const std::string &name, bool loadBasicInfoOnly /* = true*/) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `players` WHERE `name` = " << db.escapeString(name); - return loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo); + return loadPlayer(player, db.storeQuery(query.str()), loadBasicInfoOnly); } -bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) { +bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool loadBasicInfoOnly /* = false*/) { if (!result || !player) { std::string nullptrType = !result ? "Result" : "Player"; g_logger().warn("[{}] - {} is nullptr", __FUNCTION__, nullptrType); @@ -118,12 +118,8 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result try { // First - IOLoginDataLoad::loadPlayerFirst(player, result); - - // Experience load - IOLoginDataLoad::loadPlayerExperience(player, result); - - if (disableIrrelevantInfo) { + IOLoginDataLoad::loadPlayerBasicInfo(player, result); + if (loadBasicInfoOnly) { return true; } diff --git a/src/io/iologindata.hpp b/src/io/iologindata.hpp index 79fa3b59ad7..26e200cbf2f 100644 --- a/src/io/iologindata.hpp +++ b/src/io/iologindata.hpp @@ -20,9 +20,9 @@ class IOLoginData { static bool gameWorldAuthentication(const std::string &accountDescriptor, const std::string &sessionOrPassword, std::string &characterName, uint32_t &accountId, bool oldProcotol, const uint32_t ip); static uint8_t getAccountType(uint32_t accountId); static void updateOnlineStatus(uint32_t guid, bool login); - static bool loadPlayerById(std::shared_ptr player, uint32_t id, bool disableIrrelevantInfo = true); - static bool loadPlayerByName(std::shared_ptr player, const std::string &name, bool disableIrrelevantInfo = true); - static bool loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo = false); + static bool loadPlayerById(std::shared_ptr player, uint32_t id, bool loadBasicInfoOnly = true); + static bool loadPlayerByName(std::shared_ptr player, const std::string &name, bool loadBasicInfoOnly = true); + static bool loadPlayer(std::shared_ptr player, DBResult_ptr result, bool loadBasicInfoOnly = false); static bool savePlayer(std::shared_ptr player); static uint32_t getGuidByName(const std::string &name); static bool getGuidByNameEx(uint32_t &guid, bool &specialVip, std::string &name); From e938b75c9e37c0d0b45f83738f86abc7f56dd33a Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sun, 29 Sep 2024 14:57:41 -0300 Subject: [PATCH 13/29] fix: circular inclusion related to network/protocol/connection (#2924) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug Fixes and Improvements • Fixed a minor bug in the unit test. • Improved the tests build and run scripts. • Removed all redundant pch.hpp includes from the .cpp files as the directive ```target_precompile_headers(${PROJECT_NAME}_lib PUBLIC pch.hpp)``` now handles that automatically. • Added the precompiled file correctly in the visual studio solution • Resolved several circular dependencies involving the following components: - Connection - KV - Protocol --- CMakeLists.txt | 2 +- cmake/modules/CanaryLib.cmake | 4 +- src/account/account.cpp | 2 - src/account/account_repository.cpp | 2 - src/account/account_repository_db.cpp | 2 - src/canary_server.cpp | 2 - src/config/configmanager.cpp | 2 - src/creatures/appearance/mounts/mounts.cpp | 2 - src/creatures/appearance/outfit/outfit.cpp | 2 - src/creatures/combat/combat.cpp | 2 - src/creatures/combat/condition.cpp | 2 - src/creatures/combat/spells.cpp | 2 - src/creatures/creature.cpp | 2 - src/creatures/interactions/chat.cpp | 2 - src/creatures/monsters/monster.cpp | 2 - src/creatures/monsters/monsters.cpp | 2 - .../monsters/spawns/spawn_monster.cpp | 2 - src/creatures/npcs/npc.cpp | 2 - src/creatures/npcs/npcs.cpp | 2 - src/creatures/npcs/spawns/spawn_npc.cpp | 2 - .../achievement/player_achievement.cpp | 2 - .../players/cyclopedia/player_badge.cpp | 2 - .../players/cyclopedia/player_cyclopedia.cpp | 2 - .../players/cyclopedia/player_title.cpp | 2 - src/creatures/players/grouping/familiars.cpp | 2 - src/creatures/players/grouping/groups.cpp | 2 - src/creatures/players/grouping/guild.cpp | 2 - src/creatures/players/grouping/party.cpp | 2 - .../players/imbuements/imbuements.cpp | 1 - src/creatures/players/management/ban.cpp | 2 - src/creatures/players/management/waitlist.cpp | 2 - src/creatures/players/player.cpp | 6 +- src/creatures/players/storages/storages.cpp | 2 - src/creatures/players/vip/player_vip.cpp | 2 - src/creatures/players/vocations/vocation.cpp | 2 - src/creatures/players/wheel/player_wheel.cpp | 52 +++++- src/creatures/players/wheel/player_wheel.hpp | 53 +----- src/creatures/players/wheel/wheel_gems.cpp | 3 +- src/creatures/players/wheel/wheel_gems.hpp | 159 +--------------- src/database/database.cpp | 2 - src/database/databasemanager.cpp | 2 - src/database/databasetasks.cpp | 2 - src/enums/player_wheel.hpp | 171 ++++++++++++++++++ src/game/bank/bank.cpp | 2 - src/game/functions/game_reload.cpp | 2 - src/game/game.cpp | 2 - src/game/movement/position.cpp | 2 - src/game/movement/teleport.cpp | 2 - src/game/scheduling/dispatcher.cpp | 2 - src/game/scheduling/events_scheduler.cpp | 2 - src/game/scheduling/save_manager.cpp | 13 +- src/game/scheduling/save_manager.hpp | 7 +- src/game/scheduling/task.cpp | 2 - src/game/zones/zone.cpp | 2 - src/io/fileloader.cpp | 2 - src/io/filestream.cpp | 2 - src/io/functions/iologindata_load_player.cpp | 6 +- src/io/functions/iologindata_save_player.cpp | 2 - src/io/io_bosstiary.cpp | 2 - src/io/io_wheel.cpp | 4 +- src/io/iobestiary.cpp | 2 - src/io/ioguild.cpp | 2 - src/io/iologindata.cpp | 2 - src/io/iomap.cpp | 1 - src/io/iomapserialize.cpp | 2 - src/io/iomarket.cpp | 2 - src/io/ioprey.cpp | 16 +- src/io/ioprey.hpp | 16 +- src/items/bed.cpp | 2 - src/items/containers/container.cpp | 2 - src/items/containers/depot/depotchest.cpp | 2 - src/items/containers/depot/depotlocker.cpp | 2 - src/items/containers/inbox/inbox.cpp | 2 - src/items/containers/mailbox/mailbox.cpp | 2 - src/items/containers/rewards/reward.cpp | 2 - src/items/containers/rewards/rewardchest.cpp | 2 - src/items/cylinder.cpp | 2 - src/items/decay/decay.cpp | 2 - src/items/functions/item/attribute.cpp | 2 - src/items/functions/item/custom_attribute.cpp | 2 - src/items/functions/item/item_parse.cpp | 2 - src/items/item.cpp | 2 - src/items/items.cpp | 2 - src/items/thing.cpp | 2 - src/items/tile.cpp | 2 - src/items/tile.hpp | 2 +- src/items/trashholder.cpp | 2 - src/items/weapons/weapons.cpp | 2 - src/kv/kv.cpp | 4 +- src/kv/kv_definitions.hpp | 29 +++ src/kv/kv_sql.cpp | 14 +- src/kv/kv_sql.hpp | 16 +- src/kv/value_wrapper.cpp | 2 - src/kv/value_wrapper.hpp | 11 +- src/kv/value_wrapper_proto.cpp | 2 - src/lib/di/soft_singleton.cpp | 1 - src/lib/logging/log_with_spd_log.cpp | 1 - src/lib/thread/thread_pool.cpp | 2 - src/lua/callbacks/event_callback.cpp | 2 - src/lua/callbacks/events_callbacks.cpp | 2 - src/lua/creature/actions.cpp | 2 - src/lua/creature/creatureevent.cpp | 2 - src/lua/creature/events.cpp | 2 - src/lua/creature/movement.cpp | 2 - src/lua/creature/raids.cpp | 2 - src/lua/creature/talkaction.cpp | 2 - .../functions/core/game/bank_functions.cpp | 10 +- .../functions/core/game/config_functions.cpp | 2 - .../functions/core/game/game_functions.cpp | 2 - .../functions/core/game/global_functions.cpp | 2 - src/lua/functions/core/game/lua_enums.cpp | 2 - .../core/game/modal_window_functions.cpp | 2 - .../functions/core/game/zone_functions.cpp | 10 +- src/lua/functions/core/libs/bit_functions.cpp | 2 - src/lua/functions/core/libs/db_functions.cpp | 2 - src/lua/functions/core/libs/kv_functions.cpp | 2 - .../functions/core/libs/logger_functions.cpp | 2 - .../functions/core/libs/metrics_functions.cpp | 2 - .../functions/core/libs/result_functions.cpp | 2 - .../network/network_message_functions.cpp | 2 - .../core/network/webhook_functions.cpp | 2 - .../creatures/combat/combat_functions.cpp | 2 - .../creatures/combat/condition_functions.cpp | 2 - .../creatures/combat/spell_functions.cpp | 2 - .../creatures/combat/variant_functions.cpp | 2 - .../creatures/creature_functions.cpp | 2 - .../creatures/monster/charm_functions.cpp | 2 - .../creatures/monster/loot_functions.cpp | 2 - .../creatures/monster/monster_functions.cpp | 2 - .../monster/monster_spell_functions.cpp | 2 - .../monster/monster_type_functions.cpp | 2 - .../functions/creatures/npc/npc_functions.cpp | 2 - .../creatures/npc/npc_type_functions.cpp | 2 - .../creatures/npc/shop_functions.cpp | 2 - .../creatures/player/group_functions.cpp | 2 - .../creatures/player/guild_functions.cpp | 2 - .../creatures/player/mount_functions.cpp | 2 - .../creatures/player/party_functions.cpp | 2 - .../creatures/player/player_functions.cpp | 2 - .../creatures/player/vocation_functions.cpp | 2 - src/lua/functions/events/action_functions.cpp | 2 - .../events/creature_event_functions.cpp | 2 - .../events/event_callback_functions.cpp | 2 - .../events/events_scheduler_functions.cpp | 2 - .../events/global_event_functions.cpp | 2 - .../functions/events/move_event_functions.cpp | 2 - .../events/talk_action_functions.cpp | 2 - .../functions/items/container_functions.cpp | 2 - .../functions/items/imbuement_functions.cpp | 2 - .../items/item_classification_functions.cpp | 2 - src/lua/functions/items/item_functions.cpp | 2 - .../functions/items/item_type_functions.cpp | 2 - src/lua/functions/items/weapon_functions.cpp | 2 - src/lua/functions/lua_functions_loader.cpp | 2 - src/lua/functions/map/house_functions.cpp | 2 - src/lua/functions/map/position_functions.cpp | 2 - src/lua/functions/map/teleport_functions.cpp | 2 - src/lua/functions/map/tile_functions.cpp | 2 - src/lua/functions/map/town_functions.cpp | 2 - src/lua/global/baseevents.cpp | 2 - src/lua/global/globalevent.cpp | 2 - src/lua/modules/modules.cpp | 2 - src/lua/scripts/lua_environment.cpp | 2 - src/lua/scripts/luascript.cpp | 2 - src/lua/scripts/script_environment.cpp | 2 - src/lua/scripts/scripts.cpp | 2 - src/main.cpp | 1 - src/map/house/house.cpp | 2 - src/map/house/housetile.cpp | 2 - src/map/map.cpp | 2 - src/map/mapcache.cpp | 2 - src/map/spectators.cpp | 2 - src/map/utils/astarnodes.cpp | 2 - src/map/utils/mapsector.cpp | 2 - src/pch.cpp | 11 ++ src/security/argon.cpp | 2 - src/security/rsa.cpp | 2 - src/server/network/connection/connection.cpp | 46 +++-- src/server/network/connection/connection.hpp | 11 +- src/server/network/message/networkmessage.cpp | 2 - src/server/network/message/outputmessage.cpp | 8 +- src/server/network/message/outputmessage.hpp | 4 +- src/server/network/protocol/protocol.cpp | 65 +++++-- src/server/network/protocol/protocol.hpp | 52 ++---- src/server/network/protocol/protocolgame.cpp | 4 +- src/server/network/protocol/protocolgame.hpp | 2 +- src/server/network/protocol/protocollogin.cpp | 2 - .../network/protocol/protocolstatus.cpp | 2 - src/server/network/webhook/webhook.cpp | 2 - src/server/server.cpp | 2 - src/server/server_definitions.hpp | 2 + src/server/signals.cpp | 2 - src/utils/pugicast.cpp | 2 +- src/utils/tools.cpp | 2 - src/utils/wildcardtree.cpp | 2 - tests/build_and_run.sh | 14 +- tests/integration/main.cpp | 1 + vcproj/canary.vcxproj | 11 +- 198 files changed, 486 insertions(+), 674 deletions(-) create mode 100644 src/enums/player_wheel.hpp create mode 100644 src/kv/kv_definitions.hpp create mode 100644 src/pch.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index d5853366d80..5bee518ecd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,6 @@ option(RUN_TESTS_AFTER_BUILD "Run tests when building" OFF) # By default, tests # ***************************************************************************** add_subdirectory(src) -if(BUILD_TESTS) +if(BUILD_TESTS OR PACKAGE_TESTS) add_subdirectory(tests) endif() diff --git a/cmake/modules/CanaryLib.cmake b/cmake/modules/CanaryLib.cmake index a3f5410b9d8..84d1c96c214 100644 --- a/cmake/modules/CanaryLib.cmake +++ b/cmake/modules/CanaryLib.cmake @@ -23,9 +23,7 @@ add_subdirectory(utils) target_sources(${PROJECT_NAME}_lib PRIVATE canary_server.cpp) # Add public pre compiler header to lib, to pass down to related targets -if (NOT SPEED_UP_BUILD_UNITY) - target_precompile_headers(${PROJECT_NAME}_lib PUBLIC pch.hpp) -endif() +target_precompile_headers(${PROJECT_NAME}_lib PUBLIC pch.hpp) if(NOT SPEED_UP_BUILD_UNITY AND USE_PRECOMPILED_HEADERS) target_compile_definitions(${PROJECT_NAME}_lib PUBLIC -DUSE_PRECOMPILED_HEADERS) diff --git a/src/account/account.cpp b/src/account/account.cpp index 2e5f58dd864..8b67c09ebca 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "account/account.hpp" #include "account/account_repository_db.hpp" diff --git a/src/account/account_repository.cpp b/src/account/account_repository.cpp index babca847043..f329825645d 100644 --- a/src/account/account_repository.cpp +++ b/src/account/account_repository.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "account/account_repository.hpp" #include "lib/di/container.hpp" diff --git a/src/account/account_repository_db.cpp b/src/account/account_repository_db.cpp index 81da30c08c5..a6d169ef4af 100644 --- a/src/account/account_repository_db.cpp +++ b/src/account/account_repository_db.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "account/account_repository_db.hpp" #include "database/database.hpp" diff --git a/src/canary_server.cpp b/src/canary_server.cpp index f71fc71ba9a..f46d34f7104 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "canary_server.hpp" #include "declarations.hpp" diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 9ce861665de..1d0138483a9 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "config/configmanager.hpp" #include "lib/di/container.hpp" #include "game/game.hpp" diff --git a/src/creatures/appearance/mounts/mounts.cpp b/src/creatures/appearance/mounts/mounts.cpp index 7014d0b026b..ada9fb1c4ff 100644 --- a/src/creatures/appearance/mounts/mounts.cpp +++ b/src/creatures/appearance/mounts/mounts.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/appearance/mounts/mounts.hpp" #include "game/game.hpp" #include "utils/pugicast.hpp" diff --git a/src/creatures/appearance/outfit/outfit.cpp b/src/creatures/appearance/outfit/outfit.cpp index 251bf7bde35..40c28a1d7bb 100644 --- a/src/creatures/appearance/outfit/outfit.cpp +++ b/src/creatures/appearance/outfit/outfit.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/appearance/outfit/outfit.hpp" #include "utils/pugicast.hpp" #include "utils/tools.hpp" diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index d65d10e4e6f..4920e8cdc4e 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "declarations.hpp" #include "creatures/combat/combat.hpp" #include "lua/creature/events.hpp" diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp index b308c05a5bc..f07126ed868 100644 --- a/src/creatures/combat/condition.cpp +++ b/src/creatures/combat/condition.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/condition.hpp" #include "game/game.hpp" #include "game/scheduling/dispatcher.hpp" diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index 105bf734c23..263d7041887 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/combat.hpp" #include "creatures/combat/spells.hpp" #include "creatures/monsters/monster.hpp" diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index 56ed1770039..438355cbf07 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/creature.hpp" #include "declarations.hpp" #include "game/scheduling/dispatcher.hpp" diff --git a/src/creatures/interactions/chat.cpp b/src/creatures/interactions/chat.cpp index 900247e457a..84f4dd67e23 100644 --- a/src/creatures/interactions/chat.cpp +++ b/src/creatures/interactions/chat.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/interactions/chat.hpp" #include "game/game.hpp" #include "utils/pugicast.hpp" diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 4a6d07fe8d7..1db78747947 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/monsters/monster.hpp" #include "creatures/combat/spells.hpp" #include "creatures/players/wheel/player_wheel.hpp" diff --git a/src/creatures/monsters/monsters.cpp b/src/creatures/monsters/monsters.cpp index 7e192a79575..9a1c2b70634 100644 --- a/src/creatures/monsters/monsters.cpp +++ b/src/creatures/monsters/monsters.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/monsters/monsters.hpp" #include "creatures/combat/spells.hpp" diff --git a/src/creatures/monsters/spawns/spawn_monster.cpp b/src/creatures/monsters/spawns/spawn_monster.cpp index 93b381da061..828549e7153 100644 --- a/src/creatures/monsters/spawns/spawn_monster.cpp +++ b/src/creatures/monsters/spawns/spawn_monster.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/monsters/spawns/spawn_monster.hpp" #include "game/game.hpp" #include "creatures/monsters/monster.hpp" diff --git a/src/creatures/npcs/npc.cpp b/src/creatures/npcs/npc.cpp index 05f22780ada..4a767dee320 100644 --- a/src/creatures/npcs/npc.cpp +++ b/src/creatures/npcs/npc.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/npcs/npc.hpp" #include "creatures/npcs/npcs.hpp" #include "declarations.hpp" diff --git a/src/creatures/npcs/npcs.cpp b/src/creatures/npcs/npcs.cpp index 6fe7f0b8320..05fc48a63d8 100644 --- a/src/creatures/npcs/npcs.cpp +++ b/src/creatures/npcs/npcs.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "declarations.hpp" #include "creatures/combat/combat.hpp" #include "lua/scripts/lua_environment.hpp" diff --git a/src/creatures/npcs/spawns/spawn_npc.cpp b/src/creatures/npcs/spawns/spawn_npc.cpp index 694822c2386..0976e96b68f 100644 --- a/src/creatures/npcs/spawns/spawn_npc.cpp +++ b/src/creatures/npcs/spawns/spawn_npc.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/npcs/spawns/spawn_npc.hpp" #include "creatures/npcs/npc.hpp" #include "game/game.hpp" diff --git a/src/creatures/players/achievement/player_achievement.cpp b/src/creatures/players/achievement/player_achievement.cpp index cd0735ab54c..5a9c1f55858 100644 --- a/src/creatures/players/achievement/player_achievement.cpp +++ b/src/creatures/players/achievement/player_achievement.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "player_achievement.hpp" #include "creatures/players/player.hpp" diff --git a/src/creatures/players/cyclopedia/player_badge.cpp b/src/creatures/players/cyclopedia/player_badge.cpp index 5f78c1a2e3c..c19e2443db1 100644 --- a/src/creatures/players/cyclopedia/player_badge.cpp +++ b/src/creatures/players/cyclopedia/player_badge.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "player_badge.hpp" #include "creatures/players/player.hpp" diff --git a/src/creatures/players/cyclopedia/player_cyclopedia.cpp b/src/creatures/players/cyclopedia/player_cyclopedia.cpp index eb7e05d2338..de34e1d8250 100644 --- a/src/creatures/players/cyclopedia/player_cyclopedia.cpp +++ b/src/creatures/players/cyclopedia/player_cyclopedia.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "player_cyclopedia.hpp" #include "database/databasetasks.hpp" diff --git a/src/creatures/players/cyclopedia/player_title.cpp b/src/creatures/players/cyclopedia/player_title.cpp index 7c348cbf79d..38e4e6428d0 100644 --- a/src/creatures/players/cyclopedia/player_title.cpp +++ b/src/creatures/players/cyclopedia/player_title.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "player_title.hpp" #include "creatures/players/player.hpp" diff --git a/src/creatures/players/grouping/familiars.cpp b/src/creatures/players/grouping/familiars.cpp index 6312aaa285d..1e09fd5cd7f 100644 --- a/src/creatures/players/grouping/familiars.cpp +++ b/src/creatures/players/grouping/familiars.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/grouping/familiars.hpp" #include "lib/di/container.hpp" #include "config/configmanager.hpp" diff --git a/src/creatures/players/grouping/groups.cpp b/src/creatures/players/grouping/groups.cpp index c4dab4a9039..189d2ecc165 100644 --- a/src/creatures/players/grouping/groups.cpp +++ b/src/creatures/players/grouping/groups.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "config/configmanager.hpp" #include "game/game.hpp" #include "creatures/players/grouping/groups.hpp" diff --git a/src/creatures/players/grouping/guild.cpp b/src/creatures/players/grouping/guild.cpp index bbd662d1a1d..240593c1047 100644 --- a/src/creatures/players/grouping/guild.cpp +++ b/src/creatures/players/grouping/guild.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/grouping/guild.hpp" #include "game/game.hpp" diff --git a/src/creatures/players/grouping/party.cpp b/src/creatures/players/grouping/party.cpp index b56e0c68605..067a1acd399 100644 --- a/src/creatures/players/grouping/party.cpp +++ b/src/creatures/players/grouping/party.cpp @@ -9,8 +9,6 @@ #include -#include "pch.hpp" - #include "creatures/players/grouping/party.hpp" #include "game/game.hpp" #include "lua/creature/events.hpp" diff --git a/src/creatures/players/imbuements/imbuements.cpp b/src/creatures/players/imbuements/imbuements.cpp index 4bfb0de836b..069a77475e2 100644 --- a/src/creatures/players/imbuements/imbuements.cpp +++ b/src/creatures/players/imbuements/imbuements.cpp @@ -7,7 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" #include "creatures/players/imbuements/imbuements.hpp" #include "lua/creature/events.hpp" #include "utils/pugicast.hpp" diff --git a/src/creatures/players/management/ban.cpp b/src/creatures/players/management/ban.cpp index d81045c5344..748b784a77a 100644 --- a/src/creatures/players/management/ban.cpp +++ b/src/creatures/players/management/ban.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/management/ban.hpp" #include "database/database.hpp" #include "database/databasetasks.hpp" diff --git a/src/creatures/players/management/waitlist.cpp b/src/creatures/players/management/waitlist.cpp index 345c20f2650..f20843ea248 100644 --- a/src/creatures/players/management/waitlist.cpp +++ b/src/creatures/players/management/waitlist.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/management/waitlist.hpp" #include "game/game.hpp" diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index e3790583eff..6f5ed27d079 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/combat.hpp" #include "creatures/interactions/chat.hpp" #include "creatures/monsters/monster.hpp" @@ -6206,7 +6204,9 @@ void Player::sendIcons() { // 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())); + std::vector tempVector(iconSet.begin(), iconSet.end()); + tempVector.pop_back(); + iconSet = std::unordered_set(tempVector.begin(), tempVector.end()); } client->sendIcons(iconSet, iconBakragore); diff --git a/src/creatures/players/storages/storages.cpp b/src/creatures/players/storages/storages.cpp index 7fe925ce9e3..8f53bff0cec 100644 --- a/src/creatures/players/storages/storages.cpp +++ b/src/creatures/players/storages/storages.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/storages/storages.hpp" #include "config/configmanager.hpp" diff --git a/src/creatures/players/vip/player_vip.cpp b/src/creatures/players/vip/player_vip.cpp index 95ebe91ad5f..9d7bb7c27c7 100644 --- a/src/creatures/players/vip/player_vip.cpp +++ b/src/creatures/players/vip/player_vip.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/vip/player_vip.hpp" #include "io/iologindata.hpp" diff --git a/src/creatures/players/vocations/vocation.cpp b/src/creatures/players/vocations/vocation.cpp index 6fec2725164..3da025f7b4a 100644 --- a/src/creatures/players/vocations/vocation.cpp +++ b/src/creatures/players/vocations/vocation.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/vocations/vocation.hpp" #include "utils/pugicast.hpp" diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index b78f136312b..6500420adfc 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -7,17 +7,16 @@ * Website: https://docs.opentibiabr.org/ */ -#include "pch.hpp" - #include "creatures/players/wheel/player_wheel.hpp" +#include "config/configmanager.hpp" #include "io/io_wheel.hpp" - #include "game/game.hpp" +#include "server/network/message/networkmessage.hpp" #include "creatures/players/player.hpp" #include "creatures/combat/spells.hpp" - -#include "config/configmanager.hpp" +#include "kv/kv.hpp" +#include "creatures/players/wheel/wheel_gems.hpp" const static std::vector wheelGemBasicSlot1Allowed = { WheelGemBasicModifier_t::General_FireResistance, @@ -3151,3 +3150,46 @@ WheelGemBasicModifier_t PlayerWheel::selectBasicModifier2(WheelGemBasicModifier_ } return modifier; } + +void PlayerWheelGem::save(const std::shared_ptr &kv) const { + kv->scoped("revealed")->set(uuid, serialize()); +} +void PlayerWheelGem::remove(const std::shared_ptr &kv) const { + kv->scoped("revealed")->remove(uuid); +} + +PlayerWheelGem PlayerWheelGem::load(const std::shared_ptr &kv, const std::string &uuid) { + auto val = kv->scoped("revealed")->get(uuid); + if (!val || !val.has_value()) { + return {}; + } + return deserialize(uuid, val.value()); +} + +ValueWrapper PlayerWheelGem::serialize() const { + return { + { "uuid", uuid }, + { "locked", locked }, + { "affinity", static_cast(affinity) }, + { "quality", static_cast(quality) }, + { "basicModifier1", static_cast(basicModifier1) }, + { "basicModifier2", static_cast(basicModifier2) }, + { "supremeModifier", static_cast(supremeModifier) } + }; +} + +PlayerWheelGem PlayerWheelGem::deserialize(const std::string &uuid, const ValueWrapper &val) { + auto map = val.get(); + if (map.empty()) { + return {}; + } + return { + uuid, + map["locked"]->get(), + static_cast(map["affinity"]->get()), + static_cast(map["quality"]->get()), + static_cast(map["basicModifier1"]->get()), + static_cast(map["basicModifier2"]->get()), + static_cast(map["supremeModifier"]->get()) + }; +} diff --git a/src/creatures/players/wheel/player_wheel.hpp b/src/creatures/players/wheel/player_wheel.hpp index e94f605930c..b01b1c5a1b3 100644 --- a/src/creatures/players/wheel/player_wheel.hpp +++ b/src/creatures/players/wheel/player_wheel.hpp @@ -9,16 +9,17 @@ #pragma once -#include "io/io_wheel.hpp" #include "utils/utils_definitions.hpp" -#include "kv/kv.hpp" -#include "wheel_gems.hpp" +#include "enums/player_wheel.hpp" +#include "creatures/players/wheel/wheel_definitions.hpp" +#include "kv/kv_definitions.hpp" class Spell; class Player; class Creature; class NetworkMessage; -class IOWheel; +class KV; +class WheelModifierContext; struct PlayerWheelGem { std::string uuid; @@ -33,50 +34,16 @@ struct PlayerWheelGem { return fmt::format("[PlayerWheelGem] uuid: {}, locked: {}, affinity: {}, quality: {}, basicModifier1: {}, basicModifier2: {}, supremeModifier: {}", uuid, locked, static_cast(affinity), static_cast(quality), static_cast(basicModifier1), static_cast(basicModifier2), static_cast(supremeModifier)); } - void save(const std::shared_ptr &kv) const { - kv->scoped("revealed")->set(uuid, serialize()); - } + void save(const std::shared_ptr &kv) const; - void remove(const std::shared_ptr &kv) const { - kv->scoped("revealed")->remove(uuid); - } + void remove(const std::shared_ptr &kv) const; - static PlayerWheelGem load(const std::shared_ptr &kv, const std::string &uuid) { - auto val = kv->scoped("revealed")->get(uuid); - if (!val || !val.has_value()) { - return {}; - } - return deserialize(uuid, val.value()); - } + static PlayerWheelGem load(const std::shared_ptr &kv, const std::string &uuid); private: - ValueWrapper serialize() const { - return { - { "uuid", uuid }, - { "locked", locked }, - { "affinity", static_cast(affinity) }, - { "quality", static_cast(quality) }, - { "basicModifier1", static_cast(basicModifier1) }, - { "basicModifier2", static_cast(basicModifier2) }, - { "supremeModifier", static_cast(supremeModifier) } - }; - } + ValueWrapper serialize() const; - static PlayerWheelGem deserialize(const std::string &uuid, const ValueWrapper &val) { - auto map = val.get(); - if (map.empty()) { - return {}; - } - return { - uuid, - map["locked"]->get(), - static_cast(map["affinity"]->get()), - static_cast(map["quality"]->get()), - static_cast(map["basicModifier1"]->get()), - static_cast(map["basicModifier2"]->get()), - static_cast(map["supremeModifier"]->get()) - }; - } + static PlayerWheelGem deserialize(const std::string &uuid, const ValueWrapper &val); }; class PlayerWheel { diff --git a/src/creatures/players/wheel/wheel_gems.cpp b/src/creatures/players/wheel/wheel_gems.cpp index c3653298c12..186a6939186 100644 --- a/src/creatures/players/wheel/wheel_gems.cpp +++ b/src/creatures/players/wheel/wheel_gems.cpp @@ -7,9 +7,10 @@ * Website: https://docs.opentibiabr.org/ */ -#include "pch.hpp" +#include "creatures/players/wheel/wheel_gems.hpp" #include "creatures/players/wheel/player_wheel.hpp" +#include "enums/player_wheel.hpp" void GemModifierResistanceStrategy::execute() { m_wheel.addResistance(m_combatType, m_resistance); diff --git a/src/creatures/players/wheel/wheel_gems.hpp b/src/creatures/players/wheel/wheel_gems.hpp index 668d8fe05db..dc691fa2b26 100644 --- a/src/creatures/players/wheel/wheel_gems.hpp +++ b/src/creatures/players/wheel/wheel_gems.hpp @@ -9,167 +9,12 @@ #pragma once +#include "creatures/creatures_definitions.hpp" #include "wheel_definitions.hpp" +#include "enums/player_wheel.hpp" class PlayerWheel; -enum class WheelGemAction_t : uint8_t { - Destroy, - Reveal, - SwitchDomain, - ToggleLock, -}; - -enum class WheelGemAffinity_t : uint8_t { - Green, - Red, - Blue, - Purple, -}; - -enum class WheelGemQuality_t : uint8_t { - Lesser, - Regular, - Greater, -}; - -enum class WheelGemBasicModifier_t : uint8_t { - General_PhysicalResistance, - General_HolyResistance, - General_DeathResistance, - General_FireResistance, - General_EarthResistance, - General_IceResistance, - General_EnergyResistance, - - General_HolyResistance_DeathWeakness, - General_DeathResistance_HolyWeakness, - General_FireResistance_EarthResistance, - General_FireResistance_IceResistance, - General_FireResistance_EnergyResistance, - General_EarthResistance_IceResistance, - General_EarthResistance_EnergyResistance, - General_IceResistance_EnergyResistance, - - General_FireResistance_EarthWeakness, - General_FireResistance_IceWeakness, - General_FireResistance_EnergyWeakness, - General_EarthResistance_FireWeakness, - General_EarthResistance_IceWeakness, - General_EarthResistance_EnergyWeakness, - General_IceResistance_EarthWeakness, - General_IceResistance_FireWeakness, - General_IceResistance_EnergyWeakness, - General_EnergyResistance_EarthWeakness, - General_EnergyResistance_IceWeakness, - General_EnergyResistance_FireWeakness, - General_ManaDrainResistance, - General_LifeDrainResistance, - General_ManaDrainResistance_LifeDrainResistance, - General_MitigationMultiplier, - - Vocation_Health, - Vocation_Capacity, - Vocation_Mana_FireResistance, - Vocation_Mana_EnergyResistance, - Vocation_Mana_Earth_Resistance, - Vocation_Mana_Ice_Resistance, - Vocation_Mana, - Vocation_Health_FireResistance, - Vocation_Health_EnergyResistance, - Vocation_Health_EarthResistance, - Vocation_Health_IceResistance, - Vocation_Mixed, - Vocation_Mixed2, - Vocation_Capacity_FireResistance, - Vocation_Capacity_EnergyResistance, - Vocation_Capacity_EarthResistance, - Vocation_Capacity_IceResistance, -}; - -enum class WheelGemSupremeModifier_t : uint8_t { - General_Dodge, - General_CriticalDamage, - General_LifeLeech, - General_ManaLeech, - SorcererDruid_UltimateHealing, - General_RevelationMastery_GiftOfLife, - - Knight_AvatarOfSteel_Cooldown, - Knight_ExecutionersThrow_Cooldown, - Knight_ExecutionersThrow_DamageIncrease, - Knight_ExecutionersThrow_CriticalExtraDamage, - Knight_Fierce_Berserk_DamageIncrease, - Knight_Fierce_Berserk_CriticalExtraDamage, - Knight_Berserk_DamageIncrease, - Knight_Berserk_CriticalExtraDamage, - Knight_Front_Sweep_CriticalExtraDamage, - Knight_Front_Sweep_DamageIncrease, - Knight_Groundshaker_DamageIncrease, - Knight_Groundshaker_CriticalExtraDamage, - Knight_Annihilation_CriticalExtraDamage, - Knight_Annihilation_DamageIncrease, - Knight_FairWoundCleansing_HealingIncrease, - Knight_RevelationMastery_AvatarOfSteel, - Knight_RevelationMastery_ExecutionersThrow, - Knight_RevelationMastery_CombatMastery, - - Paladin_AvatarOfLight_Cooldown, - Paladin_DivineDazzle_Cooldown, - Paladin_DivineGrenade_DamageIncrease, - Paladin_DivineGrenade_CriticalExtraDamage, - Paladin_DivineCaldera_DamageIncrease, - Paladin_DivineCaldera_CriticalExtraDamage, - Paladin_DivineMissile_DamageIncrease, - Paladin_DivineMissile_CriticalExtraDamage, - Paladin_EtherealSpear_DamageIncrease, - Paladin_EtherealSpear_CriticalExtraDamage, - Paladin_StrongEtherealSpear_DamageIncrease, - Paladin_StrongEtherealSpear_CriticalExtraDamage, - Paladin_DivineEmpowerment_Cooldown, - Paladin_DivineGrenade_Cooldown, - Paladin_Salvation_HealingIncrease, - Paladin_RevelationMastery_AvatarOfLight, - Paladin_RevelationMastery_DivineGrenade, - Paladin_RevelationMastery_DivineEmpowerment, - - Sorcerer_AvatarOfStorm_Cooldown, - Sorcerer_EnergyWave_Cooldown, - Sorcerer_GreatDeathBeam_DamageIncrease, - Sorcerer_GreatDeathBeam_CriticalExtraDamage, - Sorcerer_HellsCore_DamageIncrease, - Sorcerer_HellsCore_CriticalExtraDamage, - Sorcerer_EnergyWave_DamageIncrease, - Sorcerer_EnergyWave_CriticalExtraDamage, - Sorcerer_GreatFireWave_DamageIncrease, - Sorcerer_GreatFireWave_CriticalExtraDamage, - Sorcerer_RageOfTheSkies_DamageIncrease, - Sorcerer_RageOfTheSkies_CriticalExtraDamage, - Sorcerer_GreatEnergyBeam_DamageIncrease, - Sorcerer_GreatEnergyBeam_CriticalExtraDamage, - Sorcerer_RevelationMastery_AvatarOfStorm, - Sorcerer_RevelationMastery_BeamMastery, - Sorcerer_RevelationMastery_DrainBody, - - Druid_AvatarOfNature_Cooldown, - Druid_NaturesEmbrace_Cooldown, - Druid_TerraBurst_DamageIncrease, - Druid_TerraBurst_CriticalExtraDamage, - Druid_IceBurst_DamageIncrease, - Druid_IceBurst_CriticalExtraDamage, - Druid_EternalWinter_CriticalExtraDamage, - Druid_EternalWinter_DamageIncrease, - Druid_TerraWave_DamageIncrease, - Druid_TerraWave_CriticalExtraDamage, - Druid_StrongIceWave_DamageIncrease, - Druid_StrongIceWave_CriticalExtraDamage, - Druid_HealFriend_HealingIncrease, - Druid_MassHealing_HealingIncrease, - Druid_RevelationMastery_AvatarOfNature, - Druid_RevelationMastery_BlessingOfTheGrove, - Druid_RevelationMastery_TwinBursts, -}; - class GemModifierStrategy { public: explicit GemModifierStrategy(PlayerWheel &wheel) : diff --git a/src/database/database.cpp b/src/database/database.cpp index f226587c511..50b795455d3 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "config/configmanager.hpp" #include "database/database.hpp" #include "lib/di/container.hpp" diff --git a/src/database/databasemanager.cpp b/src/database/databasemanager.cpp index dfbb7d9a64a..3e55799e45a 100644 --- a/src/database/databasemanager.cpp +++ b/src/database/databasemanager.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "config/configmanager.hpp" #include "database/databasemanager.hpp" #include "lua/functions/core/libs/core_libs_functions.hpp" diff --git a/src/database/databasetasks.cpp b/src/database/databasetasks.cpp index 8a660f1c031..010b3f16320 100644 --- a/src/database/databasetasks.cpp +++ b/src/database/databasetasks.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "database/databasetasks.hpp" #include "game/scheduling/dispatcher.hpp" #include "lib/thread/thread_pool.hpp" diff --git a/src/enums/player_wheel.hpp b/src/enums/player_wheel.hpp new file mode 100644 index 00000000000..81cde57f651 --- /dev/null +++ b/src/enums/player_wheel.hpp @@ -0,0 +1,171 @@ +/** + * 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 WheelGemAction_t : uint8_t { + Destroy, + Reveal, + SwitchDomain, + ToggleLock, +}; + +enum class WheelGemAffinity_t : uint8_t { + Green, + Red, + Blue, + Purple, +}; + +enum class WheelGemQuality_t : uint8_t { + Lesser, + Regular, + Greater, +}; + +enum class WheelGemBasicModifier_t : uint8_t { + General_PhysicalResistance, + General_HolyResistance, + General_DeathResistance, + General_FireResistance, + General_EarthResistance, + General_IceResistance, + General_EnergyResistance, + + General_HolyResistance_DeathWeakness, + General_DeathResistance_HolyWeakness, + General_FireResistance_EarthResistance, + General_FireResistance_IceResistance, + General_FireResistance_EnergyResistance, + General_EarthResistance_IceResistance, + General_EarthResistance_EnergyResistance, + General_IceResistance_EnergyResistance, + + General_FireResistance_EarthWeakness, + General_FireResistance_IceWeakness, + General_FireResistance_EnergyWeakness, + General_EarthResistance_FireWeakness, + General_EarthResistance_IceWeakness, + General_EarthResistance_EnergyWeakness, + General_IceResistance_EarthWeakness, + General_IceResistance_FireWeakness, + General_IceResistance_EnergyWeakness, + General_EnergyResistance_EarthWeakness, + General_EnergyResistance_IceWeakness, + General_EnergyResistance_FireWeakness, + General_ManaDrainResistance, + General_LifeDrainResistance, + General_ManaDrainResistance_LifeDrainResistance, + General_MitigationMultiplier, + + Vocation_Health, + Vocation_Capacity, + Vocation_Mana_FireResistance, + Vocation_Mana_EnergyResistance, + Vocation_Mana_Earth_Resistance, + Vocation_Mana_Ice_Resistance, + Vocation_Mana, + Vocation_Health_FireResistance, + Vocation_Health_EnergyResistance, + Vocation_Health_EarthResistance, + Vocation_Health_IceResistance, + Vocation_Mixed, + Vocation_Mixed2, + Vocation_Capacity_FireResistance, + Vocation_Capacity_EnergyResistance, + Vocation_Capacity_EarthResistance, + Vocation_Capacity_IceResistance, +}; + +enum class WheelGemSupremeModifier_t : uint8_t { + General_Dodge, + General_CriticalDamage, + General_LifeLeech, + General_ManaLeech, + SorcererDruid_UltimateHealing, + General_RevelationMastery_GiftOfLife, + + Knight_AvatarOfSteel_Cooldown, + Knight_ExecutionersThrow_Cooldown, + Knight_ExecutionersThrow_DamageIncrease, + Knight_ExecutionersThrow_CriticalExtraDamage, + Knight_Fierce_Berserk_DamageIncrease, + Knight_Fierce_Berserk_CriticalExtraDamage, + Knight_Berserk_DamageIncrease, + Knight_Berserk_CriticalExtraDamage, + Knight_Front_Sweep_CriticalExtraDamage, + Knight_Front_Sweep_DamageIncrease, + Knight_Groundshaker_DamageIncrease, + Knight_Groundshaker_CriticalExtraDamage, + Knight_Annihilation_CriticalExtraDamage, + Knight_Annihilation_DamageIncrease, + Knight_FairWoundCleansing_HealingIncrease, + Knight_RevelationMastery_AvatarOfSteel, + Knight_RevelationMastery_ExecutionersThrow, + Knight_RevelationMastery_CombatMastery, + + Paladin_AvatarOfLight_Cooldown, + Paladin_DivineDazzle_Cooldown, + Paladin_DivineGrenade_DamageIncrease, + Paladin_DivineGrenade_CriticalExtraDamage, + Paladin_DivineCaldera_DamageIncrease, + Paladin_DivineCaldera_CriticalExtraDamage, + Paladin_DivineMissile_DamageIncrease, + Paladin_DivineMissile_CriticalExtraDamage, + Paladin_EtherealSpear_DamageIncrease, + Paladin_EtherealSpear_CriticalExtraDamage, + Paladin_StrongEtherealSpear_DamageIncrease, + Paladin_StrongEtherealSpear_CriticalExtraDamage, + Paladin_DivineEmpowerment_Cooldown, + Paladin_DivineGrenade_Cooldown, + Paladin_Salvation_HealingIncrease, + Paladin_RevelationMastery_AvatarOfLight, + Paladin_RevelationMastery_DivineGrenade, + Paladin_RevelationMastery_DivineEmpowerment, + + Sorcerer_AvatarOfStorm_Cooldown, + Sorcerer_EnergyWave_Cooldown, + Sorcerer_GreatDeathBeam_DamageIncrease, + Sorcerer_GreatDeathBeam_CriticalExtraDamage, + Sorcerer_HellsCore_DamageIncrease, + Sorcerer_HellsCore_CriticalExtraDamage, + Sorcerer_EnergyWave_DamageIncrease, + Sorcerer_EnergyWave_CriticalExtraDamage, + Sorcerer_GreatFireWave_DamageIncrease, + Sorcerer_GreatFireWave_CriticalExtraDamage, + Sorcerer_RageOfTheSkies_DamageIncrease, + Sorcerer_RageOfTheSkies_CriticalExtraDamage, + Sorcerer_GreatEnergyBeam_DamageIncrease, + Sorcerer_GreatEnergyBeam_CriticalExtraDamage, + Sorcerer_RevelationMastery_AvatarOfStorm, + Sorcerer_RevelationMastery_BeamMastery, + Sorcerer_RevelationMastery_DrainBody, + + Druid_AvatarOfNature_Cooldown, + Druid_NaturesEmbrace_Cooldown, + Druid_TerraBurst_DamageIncrease, + Druid_TerraBurst_CriticalExtraDamage, + Druid_IceBurst_DamageIncrease, + Druid_IceBurst_CriticalExtraDamage, + Druid_EternalWinter_CriticalExtraDamage, + Druid_EternalWinter_DamageIncrease, + Druid_TerraWave_DamageIncrease, + Druid_TerraWave_CriticalExtraDamage, + Druid_StrongIceWave_DamageIncrease, + Druid_StrongIceWave_CriticalExtraDamage, + Druid_HealFriend_HealingIncrease, + Druid_MassHealing_HealingIncrease, + Druid_RevelationMastery_AvatarOfNature, + Druid_RevelationMastery_BlessingOfTheGrove, + Druid_RevelationMastery_TwinBursts, +}; diff --git a/src/game/bank/bank.cpp b/src/game/bank/bank.cpp index 33d97c92ee5..0a876e62210 100644 --- a/src/game/bank/bank.cpp +++ b/src/game/bank/bank.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "bank.hpp" #include "game/game.hpp" #include "creatures/players/player.hpp" diff --git a/src/game/functions/game_reload.cpp b/src/game/functions/game_reload.cpp index d9d9eb1f449..d42f7ec3c78 100644 --- a/src/game/functions/game_reload.cpp +++ b/src/game/functions/game_reload.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/functions/game_reload.hpp" #include "config/configmanager.hpp" diff --git a/src/game/game.cpp b/src/game/game.cpp index 77dffe532f0..381792c3092 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "lua/creature/actions.hpp" diff --git a/src/game/movement/position.cpp b/src/game/movement/position.cpp index 807a65ad458..46ea6ea573d 100644 --- a/src/game/movement/position.cpp +++ b/src/game/movement/position.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/movement/position.hpp" #include "utils/tools.hpp" diff --git a/src/game/movement/teleport.cpp b/src/game/movement/teleport.cpp index 44050100eb6..595fe5f33ca 100644 --- a/src/game/movement/teleport.cpp +++ b/src/game/movement/teleport.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "game/movement/teleport.hpp" diff --git a/src/game/scheduling/dispatcher.cpp b/src/game/scheduling/dispatcher.cpp index eaedaa86ac5..db0aae845a6 100644 --- a/src/game/scheduling/dispatcher.cpp +++ b/src/game/scheduling/dispatcher.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/scheduling/dispatcher.hpp" #include "lib/thread/thread_pool.hpp" #include "lib/di/container.hpp" diff --git a/src/game/scheduling/events_scheduler.cpp b/src/game/scheduling/events_scheduler.cpp index a86254fa35c..3089d9cdcd6 100644 --- a/src/game/scheduling/events_scheduler.cpp +++ b/src/game/scheduling/events_scheduler.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "config/configmanager.hpp" #include "game/scheduling/events_scheduler.hpp" #include "lua/scripts/scripts.hpp" diff --git a/src/game/scheduling/save_manager.cpp b/src/game/scheduling/save_manager.cpp index fbad528598b..4d98da9900f 100644 --- a/src/game/scheduling/save_manager.cpp +++ b/src/game/scheduling/save_manager.cpp @@ -1,8 +1,17 @@ -#include "pch.hpp" +/** + * 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/ + */ -#include "game/game.hpp" #include "game/scheduling/save_manager.hpp" + +#include "game/game.hpp" #include "io/iologindata.hpp" +#include "kv/kv.hpp" SaveManager::SaveManager(ThreadPool &threadPool, KVStore &kvStore, Logger &logger, Game &game) : threadPool(threadPool), kv(kvStore), logger(logger), game(game) { } diff --git a/src/game/scheduling/save_manager.hpp b/src/game/scheduling/save_manager.hpp index 745231c0075..4bd66a7966f 100644 --- a/src/game/scheduling/save_manager.hpp +++ b/src/game/scheduling/save_manager.hpp @@ -10,7 +10,12 @@ #pragma once #include "lib/thread/thread_pool.hpp" -#include "kv/kv.hpp" + +class KVStore; +class Logger; +class Game; +class Player; +class Guild; class SaveManager { public: diff --git a/src/game/scheduling/task.cpp b/src/game/scheduling/task.cpp index 96355968bd1..0e1f6489516 100644 --- a/src/game/scheduling/task.cpp +++ b/src/game/scheduling/task.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "task.hpp" #include "lib/logging/log_with_spd_log.hpp" diff --git a/src/game/zones/zone.cpp b/src/game/zones/zone.cpp index 7ffa4b594f4..9215ef2570f 100644 --- a/src/game/zones/zone.cpp +++ b/src/game/zones/zone.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "zone.hpp" #include "game/game.hpp" #include "creatures/monsters/monster.hpp" diff --git a/src/io/fileloader.cpp b/src/io/fileloader.cpp index 38bf2be19e3..a4269ffdd30 100644 --- a/src/io/fileloader.cpp +++ b/src/io/fileloader.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "io/fileloader.hpp" namespace OTB { diff --git a/src/io/filestream.cpp b/src/io/filestream.cpp index fc8ae6116fc..71b2dd4aa2f 100644 --- a/src/io/filestream.cpp +++ b/src/io/filestream.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "io/filestream.hpp" #include "io/fileloader.hpp" diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp index 66be7927692..3042f4ce03b 100644 --- a/src/io/functions/iologindata_load_player.cpp +++ b/src/io/functions/iologindata_load_player.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/wheel/player_wheel.hpp" #include "creatures/players/achievement/player_achievement.hpp" #include "io/functions/iologindata_load_player.hpp" @@ -723,7 +721,7 @@ void IOLoginDataLoad::loadPlayerPreyClass(std::shared_ptr player, DBResu Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `player_prey` WHERE `player_id` = " << player->getGUID(); - if (result = db.storeQuery(query.str())) { + if ((result = db.storeQuery(query.str()))) { do { auto slot = std::make_unique(static_cast(result->getNumber("slot"))); auto state = static_cast(result->getNumber("state")); @@ -770,7 +768,7 @@ void IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `player_taskhunt` WHERE `player_id` = " << player->getGUID(); - if (result = db.storeQuery(query.str())) { + if ((result = db.storeQuery(query.str()))) { do { auto slot = std::make_unique(static_cast(result->getNumber("slot"))); auto state = static_cast(result->getNumber("state")); diff --git a/src/io/functions/iologindata_save_player.cpp b/src/io/functions/iologindata_save_player.cpp index eccb88c8229..9ff8fe94f64 100644 --- a/src/io/functions/iologindata_save_player.cpp +++ b/src/io/functions/iologindata_save_player.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "io/functions/iologindata_save_player.hpp" #include "game/game.hpp" diff --git a/src/io/io_bosstiary.cpp b/src/io/io_bosstiary.cpp index 7c7c8108ce7..0bb0ff15699 100644 --- a/src/io/io_bosstiary.cpp +++ b/src/io/io_bosstiary.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "io/io_bosstiary.hpp" #include "creatures/monsters/monsters.hpp" diff --git a/src/io/io_wheel.cpp b/src/io/io_wheel.cpp index e8ad30a5d80..1d2a7884e82 100644 --- a/src/io/io_wheel.cpp +++ b/src/io/io_wheel.cpp @@ -7,14 +7,12 @@ * Website: https://docs.opentibiabr.org/ */ -#include "pch.hpp" - #include "io/io_wheel.hpp" +#include "kv/kv.hpp" #include "creatures/players/wheel/player_wheel.hpp" #include "creatures/players/player.hpp" #include "creatures/combat/spells.hpp" - #include "utils/tools.hpp" #define MITIGATION_INCREASE 0.03 diff --git a/src/io/iobestiary.cpp b/src/io/iobestiary.cpp index 9cd964e7c7c..83dd2ed806e 100644 --- a/src/io/iobestiary.cpp +++ b/src/io/iobestiary.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "declarations.hpp" #include "game/game.hpp" #include "io/iobestiary.hpp" diff --git a/src/io/ioguild.cpp b/src/io/ioguild.cpp index 99e1e750676..9d3d628a42d 100644 --- a/src/io/ioguild.cpp +++ b/src/io/ioguild.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "database/database.hpp" #include "creatures/players/grouping/guild.hpp" #include "io/ioguild.hpp" diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index de445bb70f8..d6873243919 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "io/iologindata.hpp" #include "io/functions/iologindata_load_player.hpp" #include "io/functions/iologindata_save_player.hpp" diff --git a/src/io/iomap.cpp b/src/io/iomap.cpp index 1f5c5205113..d39988caa71 100644 --- a/src/io/iomap.cpp +++ b/src/io/iomap.cpp @@ -7,7 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" #include "io/iomap.hpp" #include "game/movement/teleport.hpp" #include "game/game.hpp" diff --git a/src/io/iomapserialize.cpp b/src/io/iomapserialize.cpp index e2a367c4ec4..7351cde1cb9 100644 --- a/src/io/iomapserialize.cpp +++ b/src/io/iomapserialize.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "io/iomapserialize.hpp" #include "io/iologindata.hpp" #include "game/game.hpp" diff --git a/src/io/iomarket.cpp b/src/io/iomarket.cpp index a0253e2ea01..71e707e0bd9 100644 --- a/src/io/iomarket.cpp +++ b/src/io/iomarket.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "io/iomarket.hpp" #include "database/databasetasks.hpp" #include "io/iologindata.hpp" diff --git a/src/io/ioprey.cpp b/src/io/ioprey.cpp index 93a91abade1..abea75aa6c9 100644 --- a/src/io/ioprey.cpp +++ b/src/io/ioprey.cpp @@ -7,14 +7,16 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" +#include "io/ioprey.hpp" +#include "lib/di/container.hpp" #include "creatures/monsters/monster.hpp" #include "creatures/players/player.hpp" #include "config/configmanager.hpp" #include "game/game.hpp" -#include "io/ioprey.hpp" #include "lib/metrics/metrics.hpp" +#include "server/network/message/networkmessage.hpp" +#include "server/network/protocol/protocolgame.hpp" // Prey class PreySlot::PreySlot(PreySlot_t id) : @@ -245,6 +247,10 @@ void TaskHuntingSlot::reloadReward() { } } +IOPrey &IOPrey::getInstance() { + return inject(); +} + // Prey/Task hunting global class void IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) const { if (!player) { @@ -595,7 +601,11 @@ void IOPrey::initializeTaskHuntOptions() { msg.add(option->secondKills); msg.add(option->secondReward); }); - baseDataMessage = msg; + m_baseDataMessage = msg; +} + +NetworkMessage IOPrey::getTaskHuntingBaseDate() const { + return m_baseDataMessage; } const std::unique_ptr &IOPrey::getTaskRewardOption(const std::unique_ptr &slot) const { diff --git a/src/io/ioprey.hpp b/src/io/ioprey.hpp index 221f2ce5562..df7243df6d6 100644 --- a/src/io/ioprey.hpp +++ b/src/io/ioprey.hpp @@ -9,12 +9,14 @@ #pragma once -#include "lib/di/container.hpp" -#include "server/network/protocol/protocolgame.hpp" +// TODO: Remove circular includes (maybe shared_ptr?) +#include "server/network/message/networkmessage.hpp" class PreySlot; class TaskHuntingSlot; class TaskHuntingOption; +class NetworkMessage; +class Player; static const std::unique_ptr &PreySlotNull {}; static const std::unique_ptr &TaskHuntingSlotNull {}; @@ -221,9 +223,7 @@ class IOPrey { IOPrey(const IOPrey &) = delete; void operator=(const IOPrey &) = delete; - static IOPrey &getInstance() { - return inject(); - } + static IOPrey &getInstance(); void checkPlayerPreys(std::shared_ptr player, uint8_t amount) const; void parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const; @@ -233,11 +233,9 @@ class IOPrey { void initializeTaskHuntOptions(); const std::unique_ptr &getTaskRewardOption(const std::unique_ptr &slot) const; - NetworkMessage getTaskHuntingBaseDate() const { - return baseDataMessage; - } + NetworkMessage getTaskHuntingBaseDate() const; - NetworkMessage baseDataMessage; + NetworkMessage m_baseDataMessage; std::vector> taskOption; }; diff --git a/src/items/bed.cpp b/src/items/bed.cpp index 4b38be3b474..8bfd6d119a5 100644 --- a/src/items/bed.cpp +++ b/src/items/bed.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/bed.hpp" #include "game/game.hpp" #include "io/iologindata.hpp" diff --git a/src/items/containers/container.cpp b/src/items/containers/container.cpp index 6c526a8500a..be2e63ae95b 100644 --- a/src/items/containers/container.cpp +++ b/src/items/containers/container.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/containers/container.hpp" #include "items/decay/decay.hpp" #include "io/iomap.hpp" diff --git a/src/items/containers/depot/depotchest.cpp b/src/items/containers/depot/depotchest.cpp index 15488267f04..2c7d21ed199 100644 --- a/src/items/containers/depot/depotchest.cpp +++ b/src/items/containers/depot/depotchest.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/containers/depot/depotchest.hpp" #include "utils/tools.hpp" diff --git a/src/items/containers/depot/depotlocker.cpp b/src/items/containers/depot/depotlocker.cpp index 0be000794ef..c7320293efd 100644 --- a/src/items/containers/depot/depotlocker.cpp +++ b/src/items/containers/depot/depotlocker.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/containers/depot/depotlocker.hpp" DepotLocker::DepotLocker(uint16_t type, uint16_t size) : diff --git a/src/items/containers/inbox/inbox.cpp b/src/items/containers/inbox/inbox.cpp index 9b22c53748a..220f119645f 100644 --- a/src/items/containers/inbox/inbox.cpp +++ b/src/items/containers/inbox/inbox.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/containers/inbox/inbox.hpp" #include "utils/tools.hpp" diff --git a/src/items/containers/mailbox/mailbox.cpp b/src/items/containers/mailbox/mailbox.cpp index c2c9b2f61e1..c558b85e30d 100644 --- a/src/items/containers/mailbox/mailbox.cpp +++ b/src/items/containers/mailbox/mailbox.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/containers/mailbox/mailbox.hpp" #include "game/game.hpp" #include "io/iologindata.hpp" diff --git a/src/items/containers/rewards/reward.cpp b/src/items/containers/rewards/reward.cpp index 4b1757bd6c8..6a8374e8060 100644 --- a/src/items/containers/rewards/reward.cpp +++ b/src/items/containers/rewards/reward.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/containers/rewards/reward.hpp" Reward::Reward() : diff --git a/src/items/containers/rewards/rewardchest.cpp b/src/items/containers/rewards/rewardchest.cpp index c9bb8112f90..96cf9c2edcc 100644 --- a/src/items/containers/rewards/rewardchest.cpp +++ b/src/items/containers/rewards/rewardchest.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/containers/rewards/rewardchest.hpp" RewardChest::RewardChest(uint16_t type) : diff --git a/src/items/cylinder.cpp b/src/items/cylinder.cpp index 0636e5ff34c..fa61eab2fcb 100644 --- a/src/items/cylinder.cpp +++ b/src/items/cylinder.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/cylinder.hpp" std::shared_ptr VirtualCylinder::virtualCylinder = std::make_shared(); diff --git a/src/items/decay/decay.cpp b/src/items/decay/decay.cpp index 5eaff61a7a9..bdf9ed36040 100644 --- a/src/items/decay/decay.cpp +++ b/src/items/decay/decay.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/decay/decay.hpp" #include "lib/di/container.hpp" diff --git a/src/items/functions/item/attribute.cpp b/src/items/functions/item/attribute.cpp index c67c6ce38f7..747b8c90c39 100644 --- a/src/items/functions/item/attribute.cpp +++ b/src/items/functions/item/attribute.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/functions/item/attribute.hpp" /* diff --git a/src/items/functions/item/custom_attribute.cpp b/src/items/functions/item/custom_attribute.cpp index 202c57c0960..462ba4b520a 100644 --- a/src/items/functions/item/custom_attribute.cpp +++ b/src/items/functions/item/custom_attribute.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/functions/item/custom_attribute.hpp" #include "lua/scripts/luascript.hpp" diff --git a/src/items/functions/item/item_parse.cpp b/src/items/functions/item/item_parse.cpp index 9b63b9aee0e..96fa33c2a7b 100644 --- a/src/items/functions/item/item_parse.cpp +++ b/src/items/functions/item/item_parse.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/functions/item/item_parse.hpp" #include "items/weapons/weapons.hpp" #include "lua/creature/movement.hpp" diff --git a/src/items/item.cpp b/src/items/item.cpp index 2ad0cfa4abd..43c172b8e7d 100644 --- a/src/items/item.cpp +++ b/src/items/item.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/item.hpp" #include "items/containers/container.hpp" #include "items/decay/decay.hpp" diff --git a/src/items/items.cpp b/src/items/items.cpp index 2d4020c5416..bcd055a8db5 100644 --- a/src/items/items.cpp +++ b/src/items/items.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/functions/item/item_parse.hpp" #include "items/items.hpp" #include "items/weapons/weapons.hpp" diff --git a/src/items/thing.cpp b/src/items/thing.cpp index 6eec7994df8..647f312b227 100644 --- a/src/items/thing.cpp +++ b/src/items/thing.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/thing.hpp" #include "items/tile.hpp" diff --git a/src/items/tile.cpp b/src/items/tile.cpp index fc16dd5799c..e9b0b9e8115 100644 --- a/src/items/tile.cpp +++ b/src/items/tile.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/tile.hpp" #include "creatures/creature.hpp" #include "creatures/combat/combat.hpp" diff --git a/src/items/tile.hpp b/src/items/tile.hpp index 71f9d4ae09c..1790cd2972a 100644 --- a/src/items/tile.hpp +++ b/src/items/tile.hpp @@ -256,7 +256,7 @@ class Tile : public Cylinder, public SharedObject { resetTileFlags(ground); } - if (ground = item) { + if ((ground = item)) { setTileFlags(item); } } diff --git a/src/items/trashholder.cpp b/src/items/trashholder.cpp index 65676a75a37..fe95557ce50 100644 --- a/src/items/trashholder.cpp +++ b/src/items/trashholder.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/trashholder.hpp" #include "game/game.hpp" diff --git a/src/items/weapons/weapons.cpp b/src/items/weapons/weapons.cpp index 69d20d43e06..109f0d27218 100644 --- a/src/items/weapons/weapons.cpp +++ b/src/items/weapons/weapons.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/combat.hpp" #include "game/game.hpp" #include "lua/creature/events.hpp" diff --git a/src/kv/kv.cpp b/src/kv/kv.cpp index 29a9787f72f..0a7cfe6827d 100644 --- a/src/kv/kv.cpp +++ b/src/kv/kv.cpp @@ -7,10 +7,10 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "kv/kv.hpp" + #include "lib/di/container.hpp" +#include "database/database.hpp" int64_t KV::lastTimestamp_ = 0; uint64_t KV::counter_ = 0; diff --git a/src/kv/kv_definitions.hpp b/src/kv/kv_definitions.hpp new file mode 100644 index 00000000000..e53c8b0f24a --- /dev/null +++ b/src/kv/kv_definitions.hpp @@ -0,0 +1,29 @@ +/** + * 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 + +class ValueWrapper; + +#ifndef USE_PRECOMPILED_HEADERS + #include + #include + #include + #include + #include +#endif + +using StringType = std::string; +using BooleanType = bool; +using IntType = int; +using DoubleType = double; +using ArrayType = std::vector; +using MapType = phmap::flat_hash_map>; + +using ValueVariant = std::variant; diff --git a/src/kv/kv_sql.cpp b/src/kv/kv_sql.cpp index 57d2cc57a10..0391425884c 100644 --- a/src/kv/kv_sql.cpp +++ b/src/kv/kv_sql.cpp @@ -7,14 +7,18 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "kv/kv_sql.hpp" + +#include "database/database.hpp" +#include "lib/logging/logger.hpp" #include "kv/value_wrapper_proto.hpp" #include "utils/tools.hpp" #include +KVSQL::KVSQL(Database &db, Logger &logger) : + KVStore(logger), db(db) { } + std::optional KVSQL::load(const std::string &key) { auto query = fmt::format("SELECT `key_name`, `timestamp`, `value` FROM `kv_store` WHERE `key_name` = {}", db.escapeString(key)); auto result = db.storeQuery(query); @@ -97,3 +101,9 @@ bool KVSQL::saveAll() { return success; } + +DBInsert KVSQL::dbUpdate() { + auto insert = DBInsert("INSERT INTO `kv_store` (`key_name`, `timestamp`, `value`) VALUES"); + insert.upsert({ "key_name", "timestamp", "value" }); + return insert; +} diff --git a/src/kv/kv_sql.hpp b/src/kv/kv_sql.hpp index 1d7a6387d68..43bedada82f 100644 --- a/src/kv/kv_sql.hpp +++ b/src/kv/kv_sql.hpp @@ -11,16 +11,14 @@ #include "kv/kv.hpp" -#include "database/database.hpp" -#include "lib/logging/logger.hpp" - class Database; +class Logger; +class DBInsert; +class ValueWrapper; class KVSQL final : public KVStore { public: - explicit KVSQL(Database &db, Logger &logger) : - KVStore(logger), - db(db) { } + explicit KVSQL(Database &db, Logger &logger); bool saveAll() override; @@ -30,11 +28,7 @@ class KVSQL final : public KVStore { bool save(const std::string &key, const ValueWrapper &value) override; bool prepareSave(const std::string &key, const ValueWrapper &value, DBInsert &update); - DBInsert dbUpdate() { - auto insert = DBInsert("INSERT INTO `kv_store` (`key_name`, `timestamp`, `value`) VALUES"); - insert.upsert({ "key_name", "timestamp", "value" }); - return insert; - } + DBInsert dbUpdate(); Database &db; }; diff --git a/src/kv/value_wrapper.cpp b/src/kv/value_wrapper.cpp index 78f828248a1..72920b6972a 100644 --- a/src/kv/value_wrapper.cpp +++ b/src/kv/value_wrapper.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "kv/value_wrapper.hpp" #include "utils/tools.hpp" diff --git a/src/kv/value_wrapper.hpp b/src/kv/value_wrapper.hpp index 0b388187dc3..889b1776de2 100644 --- a/src/kv/value_wrapper.hpp +++ b/src/kv/value_wrapper.hpp @@ -19,16 +19,7 @@ #include #include -class ValueWrapper; - -using StringType = std::string; -using BooleanType = bool; -using IntType = int; -using DoubleType = double; -using ArrayType = std::vector; -using MapType = phmap::flat_hash_map>; - -using ValueVariant = std::variant; +#include "kv/kv_definitions.hpp" class ValueWrapper { public: diff --git a/src/kv/value_wrapper_proto.cpp b/src/kv/value_wrapper_proto.cpp index 4362101957e..e4d60bed354 100644 --- a/src/kv/value_wrapper_proto.cpp +++ b/src/kv/value_wrapper_proto.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "kv/value_wrapper_proto.hpp" #include "kv/value_wrapper.hpp" diff --git a/src/lib/di/soft_singleton.cpp b/src/lib/di/soft_singleton.cpp index 64ea514d140..8fb90288cee 100644 --- a/src/lib/di/soft_singleton.cpp +++ b/src/lib/di/soft_singleton.cpp @@ -6,7 +6,6 @@ * Contributors: https://github.com/opentibiabr/canary/graphs/contributors * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" #include "lib/di/soft_singleton.hpp" #include "utils/tools.hpp" diff --git a/src/lib/logging/log_with_spd_log.cpp b/src/lib/logging/log_with_spd_log.cpp index f8cfe16946d..a1893e3d501 100644 --- a/src/lib/logging/log_with_spd_log.cpp +++ b/src/lib/logging/log_with_spd_log.cpp @@ -8,7 +8,6 @@ */ #include -#include "pch.hpp" #include "lib/di/container.hpp" LogWithSpdLog::LogWithSpdLog() { diff --git a/src/lib/thread/thread_pool.cpp b/src/lib/thread/thread_pool.cpp index b2f51ef8f9d..9a44c0d6dbe 100644 --- a/src/lib/thread/thread_pool.cpp +++ b/src/lib/thread/thread_pool.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lib/thread/thread_pool.hpp" #include "game/game.hpp" diff --git a/src/lua/callbacks/event_callback.cpp b/src/lua/callbacks/event_callback.cpp index 8280bad6d2b..6591755d18f 100644 --- a/src/lua/callbacks/event_callback.cpp +++ b/src/lua/callbacks/event_callback.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/callbacks/event_callback.hpp" #include "utils/tools.hpp" diff --git a/src/lua/callbacks/events_callbacks.cpp b/src/lua/callbacks/events_callbacks.cpp index 13a42baa15a..ac14fd17c5a 100644 --- a/src/lua/callbacks/events_callbacks.cpp +++ b/src/lua/callbacks/events_callbacks.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/callbacks/events_callbacks.hpp" #include "lua/callbacks/event_callback.hpp" diff --git a/src/lua/creature/actions.cpp b/src/lua/creature/actions.cpp index 9e16ee7b33e..3d9028ce406 100644 --- a/src/lua/creature/actions.cpp +++ b/src/lua/creature/actions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/creature/actions.hpp" #include "items/bed.hpp" #include "items/containers/container.hpp" diff --git a/src/lua/creature/creatureevent.cpp b/src/lua/creature/creatureevent.cpp index 90d09d2b7f9..3b7dfdceb4c 100644 --- a/src/lua/creature/creatureevent.cpp +++ b/src/lua/creature/creatureevent.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/creature/creatureevent.hpp" #include "utils/tools.hpp" #include "creatures/players/player.hpp" diff --git a/src/lua/creature/events.cpp b/src/lua/creature/events.cpp index 144c188e900..354a8ac78e8 100644 --- a/src/lua/creature/events.cpp +++ b/src/lua/creature/events.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/creature/events.hpp" #include "utils/tools.hpp" #include "items/item.hpp" diff --git a/src/lua/creature/movement.cpp b/src/lua/creature/movement.cpp index b75ff31c661..64e290d8990 100644 --- a/src/lua/creature/movement.cpp +++ b/src/lua/creature/movement.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "lua/creature/events.hpp" #include "lua/callbacks/event_callback.hpp" diff --git a/src/lua/creature/raids.cpp b/src/lua/creature/raids.cpp index 8064bf52b81..c801c4cdee4 100644 --- a/src/lua/creature/raids.cpp +++ b/src/lua/creature/raids.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/creature/raids.hpp" #include "utils/pugicast.hpp" #include "game/game.hpp" diff --git a/src/lua/creature/talkaction.cpp b/src/lua/creature/talkaction.cpp index c1b8c028ddc..ae07bfe6765 100644 --- a/src/lua/creature/talkaction.cpp +++ b/src/lua/creature/talkaction.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/player.hpp" #include "lua/scripts/scripts.hpp" #include "lua/creature/talkaction.hpp" diff --git a/src/lua/functions/core/game/bank_functions.cpp b/src/lua/functions/core/game/bank_functions.cpp index eb0bbf00280..26005db41e3 100644 --- a/src/lua/functions/core/game/bank_functions.cpp +++ b/src/lua/functions/core/game/bank_functions.cpp @@ -1,4 +1,12 @@ -#include "pch.hpp" +/** + * 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/ + */ + #include "lua/functions/core/game/bank_functions.hpp" #include "game/bank/bank.hpp" #include "game/game.hpp" diff --git a/src/lua/functions/core/game/config_functions.cpp b/src/lua/functions/core/game/config_functions.cpp index b839f720057..acd4e8c0c1c 100644 --- a/src/lua/functions/core/game/config_functions.cpp +++ b/src/lua/functions/core/game/config_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/game/config_functions.hpp" #include "config/configmanager.hpp" diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index 83544ded535..73516ce53de 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "core.hpp" #include "creatures/monsters/monster.hpp" #include "game/functions/game_reload.hpp" diff --git a/src/lua/functions/core/game/global_functions.cpp b/src/lua/functions/core/game/global_functions.cpp index 6b5175b06cf..79cb3d398fa 100644 --- a/src/lua/functions/core/game/global_functions.cpp +++ b/src/lua/functions/core/game/global_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/interactions/chat.hpp" #include "game/game.hpp" #include "game/scheduling/dispatcher.hpp" diff --git a/src/lua/functions/core/game/lua_enums.cpp b/src/lua/functions/core/game/lua_enums.cpp index e4dc252be0d..22b93351911 100644 --- a/src/lua/functions/core/game/lua_enums.cpp +++ b/src/lua/functions/core/game/lua_enums.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/game/lua_enums.hpp" #include "creatures/players/wheel/wheel_gems.hpp" diff --git a/src/lua/functions/core/game/modal_window_functions.cpp b/src/lua/functions/core/game/modal_window_functions.cpp index 0221a9e9a59..a4851cfc85a 100644 --- a/src/lua/functions/core/game/modal_window_functions.cpp +++ b/src/lua/functions/core/game/modal_window_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/player.hpp" #include "lua/functions/core/game/modal_window_functions.hpp" #include "game/modal_window/modal_window.hpp" diff --git a/src/lua/functions/core/game/zone_functions.cpp b/src/lua/functions/core/game/zone_functions.cpp index 0f19c94f789..d973f1b003c 100644 --- a/src/lua/functions/core/game/zone_functions.cpp +++ b/src/lua/functions/core/game/zone_functions.cpp @@ -1,4 +1,12 @@ -#include "pch.hpp" +/** + * 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/ + */ + #include "lua/functions/core/game/zone_functions.hpp" #include "game/zones/zone.hpp" #include "game/game.hpp" diff --git a/src/lua/functions/core/libs/bit_functions.cpp b/src/lua/functions/core/libs/bit_functions.cpp index 86f76a77a26..94e5f709b5d 100644 --- a/src/lua/functions/core/libs/bit_functions.cpp +++ b/src/lua/functions/core/libs/bit_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/libs/bit_functions.hpp" #ifndef LUAJIT_VERSION diff --git a/src/lua/functions/core/libs/db_functions.cpp b/src/lua/functions/core/libs/db_functions.cpp index d5f5a62e0f8..bdfbac8f501 100644 --- a/src/lua/functions/core/libs/db_functions.cpp +++ b/src/lua/functions/core/libs/db_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "database/databasemanager.hpp" #include "database/databasetasks.hpp" #include "lua/functions/core/libs/db_functions.hpp" diff --git a/src/lua/functions/core/libs/kv_functions.cpp b/src/lua/functions/core/libs/kv_functions.cpp index 5ed9c9cfe5d..7ef21f861f7 100644 --- a/src/lua/functions/core/libs/kv_functions.cpp +++ b/src/lua/functions/core/libs/kv_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include #include "kv/kv.hpp" diff --git a/src/lua/functions/core/libs/logger_functions.cpp b/src/lua/functions/core/libs/logger_functions.cpp index 1b2605f6421..741d35fec9d 100644 --- a/src/lua/functions/core/libs/logger_functions.cpp +++ b/src/lua/functions/core/libs/logger_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/libs/logger_functions.hpp" void LoggerFunctions::init(lua_State* L) { diff --git a/src/lua/functions/core/libs/metrics_functions.cpp b/src/lua/functions/core/libs/metrics_functions.cpp index 9dc9fa528cb..bcb233bb5aa 100644 --- a/src/lua/functions/core/libs/metrics_functions.cpp +++ b/src/lua/functions/core/libs/metrics_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/libs/metrics_functions.hpp" #include "lib/metrics/metrics.hpp" diff --git a/src/lua/functions/core/libs/result_functions.cpp b/src/lua/functions/core/libs/result_functions.cpp index 512f90f7da5..46acc07af9f 100644 --- a/src/lua/functions/core/libs/result_functions.cpp +++ b/src/lua/functions/core/libs/result_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/libs/result_functions.hpp" int ResultFunctions::luaResultGetNumber(lua_State* L) { diff --git a/src/lua/functions/core/network/network_message_functions.cpp b/src/lua/functions/core/network/network_message_functions.cpp index e2f4013448d..c7572b4488b 100644 --- a/src/lua/functions/core/network/network_message_functions.cpp +++ b/src/lua/functions/core/network/network_message_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/network/network_message_functions.hpp" #include "creatures/players/player.hpp" #include "server/network/protocol/protocolstatus.hpp" diff --git a/src/lua/functions/core/network/webhook_functions.cpp b/src/lua/functions/core/network/webhook_functions.cpp index 37372f8b23a..b24e6184ce3 100644 --- a/src/lua/functions/core/network/webhook_functions.cpp +++ b/src/lua/functions/core/network/webhook_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/core/network/webhook_functions.hpp" #include "server/network/webhook/webhook.hpp" diff --git a/src/lua/functions/creatures/combat/combat_functions.cpp b/src/lua/functions/creatures/combat/combat_functions.cpp index 3bba21d179c..f073cde6aba 100644 --- a/src/lua/functions/creatures/combat/combat_functions.cpp +++ b/src/lua/functions/creatures/combat/combat_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/combat.hpp" #include "game/game.hpp" #include "lua/functions/creatures/combat/combat_functions.hpp" diff --git a/src/lua/functions/creatures/combat/condition_functions.cpp b/src/lua/functions/creatures/combat/condition_functions.cpp index 27f21867f76..e7b1dd331ea 100644 --- a/src/lua/functions/creatures/combat/condition_functions.cpp +++ b/src/lua/functions/creatures/combat/condition_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/condition.hpp" #include "game/game.hpp" #include "lua/functions/creatures/combat/condition_functions.hpp" diff --git a/src/lua/functions/creatures/combat/spell_functions.cpp b/src/lua/functions/creatures/combat/spell_functions.cpp index a24407c1682..79ecb29b957 100644 --- a/src/lua/functions/creatures/combat/spell_functions.cpp +++ b/src/lua/functions/creatures/combat/spell_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/spells.hpp" #include "creatures/players/vocations/vocation.hpp" #include "lua/functions/creatures/combat/spell_functions.hpp" diff --git a/src/lua/functions/creatures/combat/variant_functions.cpp b/src/lua/functions/creatures/combat/variant_functions.cpp index 3b0299983fd..4723e9e8543 100644 --- a/src/lua/functions/creatures/combat/variant_functions.cpp +++ b/src/lua/functions/creatures/combat/variant_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/cylinder.hpp" #include "lua/functions/creatures/combat/variant_functions.hpp" #include "lua/global/lua_variant.hpp" diff --git a/src/lua/functions/creatures/creature_functions.cpp b/src/lua/functions/creatures/creature_functions.cpp index 81a4a0b5304..4d4a4202903 100644 --- a/src/lua/functions/creatures/creature_functions.cpp +++ b/src/lua/functions/creatures/creature_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "creatures/creature.hpp" #include "lua/functions/creatures/creature_functions.hpp" diff --git a/src/lua/functions/creatures/monster/charm_functions.cpp b/src/lua/functions/creatures/monster/charm_functions.cpp index d456f1c96a8..492820b76fa 100644 --- a/src/lua/functions/creatures/monster/charm_functions.cpp +++ b/src/lua/functions/creatures/monster/charm_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "io/iobestiary.hpp" #include "lua/functions/creatures/monster/charm_functions.hpp" diff --git a/src/lua/functions/creatures/monster/loot_functions.cpp b/src/lua/functions/creatures/monster/loot_functions.cpp index 47e0d8778e3..e05d86b6340 100644 --- a/src/lua/functions/creatures/monster/loot_functions.cpp +++ b/src/lua/functions/creatures/monster/loot_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/monsters/monsters.hpp" #include "lua/functions/creatures/monster/loot_functions.hpp" diff --git a/src/lua/functions/creatures/monster/monster_functions.cpp b/src/lua/functions/creatures/monster/monster_functions.cpp index 917e90f85f4..e7b22842640 100644 --- a/src/lua/functions/creatures/monster/monster_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "creatures/creature.hpp" #include "creatures/monsters/monster.hpp" diff --git a/src/lua/functions/creatures/monster/monster_spell_functions.cpp b/src/lua/functions/creatures/monster/monster_spell_functions.cpp index a20d57008d2..e9beb607bfc 100644 --- a/src/lua/functions/creatures/monster/monster_spell_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_spell_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/creatures/monster/monster_spell_functions.hpp" #include "creatures/monsters/monsters.hpp" diff --git a/src/lua/functions/creatures/monster/monster_type_functions.cpp b/src/lua/functions/creatures/monster/monster_type_functions.cpp index 2a6e3d1b581..f4d524a533c 100644 --- a/src/lua/functions/creatures/monster/monster_type_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_type_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "io/io_bosstiary.hpp" #include "creatures/combat/spells.hpp" diff --git a/src/lua/functions/creatures/npc/npc_functions.cpp b/src/lua/functions/creatures/npc/npc_functions.cpp index 13e9b499abc..3a161ba3501 100644 --- a/src/lua/functions/creatures/npc/npc_functions.cpp +++ b/src/lua/functions/creatures/npc/npc_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "creatures/creature.hpp" #include "creatures/npcs/npc.hpp" diff --git a/src/lua/functions/creatures/npc/npc_type_functions.cpp b/src/lua/functions/creatures/npc/npc_type_functions.cpp index ef79b671a34..8084688deea 100644 --- a/src/lua/functions/creatures/npc/npc_type_functions.cpp +++ b/src/lua/functions/creatures/npc/npc_type_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/npcs/npcs.hpp" #include "lua/functions/creatures/npc/npc_type_functions.hpp" #include "lua/scripts/scripts.hpp" diff --git a/src/lua/functions/creatures/npc/shop_functions.cpp b/src/lua/functions/creatures/npc/shop_functions.cpp index 122e249a8db..388bda0e977 100644 --- a/src/lua/functions/creatures/npc/shop_functions.cpp +++ b/src/lua/functions/creatures/npc/shop_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/npcs/npcs.hpp" #include "lua/functions/creatures/npc/shop_functions.hpp" diff --git a/src/lua/functions/creatures/player/group_functions.cpp b/src/lua/functions/creatures/player/group_functions.cpp index f547eec1590..2fd414a2e4a 100644 --- a/src/lua/functions/creatures/player/group_functions.cpp +++ b/src/lua/functions/creatures/player/group_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/grouping/groups.hpp" #include "game/game.hpp" #include "lua/functions/creatures/player/group_functions.hpp" diff --git a/src/lua/functions/creatures/player/guild_functions.cpp b/src/lua/functions/creatures/player/guild_functions.cpp index 196f0f9d31e..d5706e0609b 100644 --- a/src/lua/functions/creatures/player/guild_functions.cpp +++ b/src/lua/functions/creatures/player/guild_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "creatures/players/grouping/guild.hpp" #include "lua/functions/creatures/player/guild_functions.hpp" diff --git a/src/lua/functions/creatures/player/mount_functions.cpp b/src/lua/functions/creatures/player/mount_functions.cpp index 49b16db6caa..3decd6b2321 100644 --- a/src/lua/functions/creatures/player/mount_functions.cpp +++ b/src/lua/functions/creatures/player/mount_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/appearance/mounts/mounts.hpp" #include "game/game.hpp" #include "lua/functions/creatures/player/mount_functions.hpp" diff --git a/src/lua/functions/creatures/player/party_functions.cpp b/src/lua/functions/creatures/player/party_functions.cpp index d739cde3ceb..1791016bde3 100644 --- a/src/lua/functions/creatures/player/party_functions.cpp +++ b/src/lua/functions/creatures/player/party_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/grouping/party.hpp" #include "creatures/players/player.hpp" #include "game/game.hpp" diff --git a/src/lua/functions/creatures/player/player_functions.cpp b/src/lua/functions/creatures/player/player_functions.cpp index 421ceefcb0d..d148acf8397 100644 --- a/src/lua/functions/creatures/player/player_functions.cpp +++ b/src/lua/functions/creatures/player/player_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/creatures/player/player_functions.hpp" #include "creatures/combat/spells.hpp" diff --git a/src/lua/functions/creatures/player/vocation_functions.cpp b/src/lua/functions/creatures/player/vocation_functions.cpp index 15cf888bf8a..15e1603cc54 100644 --- a/src/lua/functions/creatures/player/vocation_functions.cpp +++ b/src/lua/functions/creatures/player/vocation_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/vocations/vocation.hpp" #include "lua/functions/creatures/player/vocation_functions.hpp" diff --git a/src/lua/functions/events/action_functions.cpp b/src/lua/functions/events/action_functions.cpp index 31b202465c7..c5cf4c73c29 100644 --- a/src/lua/functions/events/action_functions.cpp +++ b/src/lua/functions/events/action_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/creature/actions.hpp" #include "lua/functions/events/action_functions.hpp" #include "game/game.hpp" diff --git a/src/lua/functions/events/creature_event_functions.cpp b/src/lua/functions/events/creature_event_functions.cpp index 7edbabad1d3..ddba9f153fd 100644 --- a/src/lua/functions/events/creature_event_functions.cpp +++ b/src/lua/functions/events/creature_event_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/creature/creatureevent.hpp" #include "lua/functions/events/creature_event_functions.hpp" #include "utils/tools.hpp" diff --git a/src/lua/functions/events/event_callback_functions.cpp b/src/lua/functions/events/event_callback_functions.cpp index ef1c348c113..0968df435ba 100644 --- a/src/lua/functions/events/event_callback_functions.cpp +++ b/src/lua/functions/events/event_callback_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/events/event_callback_functions.hpp" #include "lua/callbacks/event_callback.hpp" diff --git a/src/lua/functions/events/events_scheduler_functions.cpp b/src/lua/functions/events/events_scheduler_functions.cpp index e26794e218a..eb16cf5c340 100644 --- a/src/lua/functions/events/events_scheduler_functions.cpp +++ b/src/lua/functions/events/events_scheduler_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/scheduling/events_scheduler.hpp" #include "lua/functions/events/events_scheduler_functions.hpp" diff --git a/src/lua/functions/events/global_event_functions.cpp b/src/lua/functions/events/global_event_functions.cpp index 129a466e97c..c858ee9a831 100644 --- a/src/lua/functions/events/global_event_functions.cpp +++ b/src/lua/functions/events/global_event_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/events/global_event_functions.hpp" #include "game/game.hpp" #include "lua/global/globalevent.hpp" diff --git a/src/lua/functions/events/move_event_functions.cpp b/src/lua/functions/events/move_event_functions.cpp index 8340dded92f..cfd8588d19b 100644 --- a/src/lua/functions/events/move_event_functions.cpp +++ b/src/lua/functions/events/move_event_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/creature.hpp" #include "lua/creature/movement.hpp" #include "lua/functions/events/move_event_functions.hpp" diff --git a/src/lua/functions/events/talk_action_functions.cpp b/src/lua/functions/events/talk_action_functions.cpp index 559e251eb8e..4a8e9850d7f 100644 --- a/src/lua/functions/events/talk_action_functions.cpp +++ b/src/lua/functions/events/talk_action_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "account/account.hpp" #include "lua/creature/talkaction.hpp" #include "lua/functions/events/talk_action_functions.hpp" diff --git a/src/lua/functions/items/container_functions.cpp b/src/lua/functions/items/container_functions.cpp index 30eb26c6801..7cc06745b18 100644 --- a/src/lua/functions/items/container_functions.cpp +++ b/src/lua/functions/items/container_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "items/item.hpp" #include "lua/functions/items/container_functions.hpp" diff --git a/src/lua/functions/items/imbuement_functions.cpp b/src/lua/functions/items/imbuement_functions.cpp index f24a3f564d7..1faed911621 100644 --- a/src/lua/functions/items/imbuement_functions.cpp +++ b/src/lua/functions/items/imbuement_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/weapons/weapons.hpp" #include "creatures/players/imbuements/imbuements.hpp" #include "lua/functions/items/imbuement_functions.hpp" diff --git a/src/lua/functions/items/item_classification_functions.cpp b/src/lua/functions/items/item_classification_functions.cpp index aa8cf19d589..4df6d6f9ea8 100644 --- a/src/lua/functions/items/item_classification_functions.cpp +++ b/src/lua/functions/items/item_classification_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "lua/functions/items/item_classification_functions.hpp" diff --git a/src/lua/functions/items/item_functions.cpp b/src/lua/functions/items/item_functions.cpp index 361a469da32..5d22b6d3102 100644 --- a/src/lua/functions/items/item_functions.cpp +++ b/src/lua/functions/items/item_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/items/item_functions.hpp" #include "game/game.hpp" diff --git a/src/lua/functions/items/item_type_functions.cpp b/src/lua/functions/items/item_type_functions.cpp index b528795a050..333e00bf763 100644 --- a/src/lua/functions/items/item_type_functions.cpp +++ b/src/lua/functions/items/item_type_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/item.hpp" #include "items/items.hpp" #include "lua/functions/items/item_type_functions.hpp" diff --git a/src/lua/functions/items/weapon_functions.cpp b/src/lua/functions/items/weapon_functions.cpp index 61eff2dfb66..cd0acf94849 100644 --- a/src/lua/functions/items/weapon_functions.cpp +++ b/src/lua/functions/items/weapon_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/functions/items/weapon_functions.hpp" #include "game/game.hpp" diff --git a/src/lua/functions/lua_functions_loader.cpp b/src/lua/functions/lua_functions_loader.cpp index c2dedfb57b6..ad52431a661 100644 --- a/src/lua/functions/lua_functions_loader.cpp +++ b/src/lua/functions/lua_functions_loader.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/combat/spells.hpp" #include "creatures/monsters/monster.hpp" #include "creatures/npcs/npc.hpp" diff --git a/src/lua/functions/map/house_functions.cpp b/src/lua/functions/map/house_functions.cpp index ffba0d0b5a9..b13e47eae10 100644 --- a/src/lua/functions/map/house_functions.cpp +++ b/src/lua/functions/map/house_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/bed.hpp" #include "game/game.hpp" #include "game/movement/position.hpp" diff --git a/src/lua/functions/map/position_functions.cpp b/src/lua/functions/map/position_functions.cpp index 0e4397f3fce..b9f5b5947f6 100644 --- a/src/lua/functions/map/position_functions.cpp +++ b/src/lua/functions/map/position_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "game/movement/position.hpp" #include "lua/functions/map/position_functions.hpp" diff --git a/src/lua/functions/map/teleport_functions.cpp b/src/lua/functions/map/teleport_functions.cpp index 32fce583057..5a5a25a20e6 100644 --- a/src/lua/functions/map/teleport_functions.cpp +++ b/src/lua/functions/map/teleport_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/movement/teleport.hpp" #include "items/item.hpp" #include "lua/functions/map/teleport_functions.hpp" diff --git a/src/lua/functions/map/tile_functions.cpp b/src/lua/functions/map/tile_functions.cpp index cdd82abda8c..8ff44064079 100644 --- a/src/lua/functions/map/tile_functions.cpp +++ b/src/lua/functions/map/tile_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "lua/functions/map/tile_functions.hpp" diff --git a/src/lua/functions/map/town_functions.cpp b/src/lua/functions/map/town_functions.cpp index 053aca36b82..3ccf112e772 100644 --- a/src/lua/functions/map/town_functions.cpp +++ b/src/lua/functions/map/town_functions.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "lua/functions/map/town_functions.hpp" #include "map/town.hpp" diff --git a/src/lua/global/baseevents.cpp b/src/lua/global/baseevents.cpp index 3b312100d3b..e4f4dfa05a5 100644 --- a/src/lua/global/baseevents.cpp +++ b/src/lua/global/baseevents.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/global/baseevents.hpp" #include "lua/scripts/lua_environment.hpp" #include "utils/tools.hpp" diff --git a/src/lua/global/globalevent.cpp b/src/lua/global/globalevent.cpp index a9d589a1f76..9cb24292b12 100644 --- a/src/lua/global/globalevent.cpp +++ b/src/lua/global/globalevent.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/global/globalevent.hpp" #include "utils/tools.hpp" #include "game/game.hpp" diff --git a/src/lua/modules/modules.cpp b/src/lua/modules/modules.cpp index 8b79524ec2c..04cddc43443 100644 --- a/src/lua/modules/modules.cpp +++ b/src/lua/modules/modules.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/modules/modules.hpp" #include "creatures/players/player.hpp" #include "game/game.hpp" diff --git a/src/lua/scripts/lua_environment.cpp b/src/lua/scripts/lua_environment.cpp index cd5023a8d4b..04afd75f958 100644 --- a/src/lua/scripts/lua_environment.cpp +++ b/src/lua/scripts/lua_environment.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "declarations.hpp" #include "lua/scripts/lua_environment.hpp" #include "lua/functions/lua_functions_loader.hpp" diff --git a/src/lua/scripts/luascript.cpp b/src/lua/scripts/luascript.cpp index d67b90e9d18..2daab6c0532 100644 --- a/src/lua/scripts/luascript.cpp +++ b/src/lua/scripts/luascript.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lua/scripts/luascript.hpp" #include "lua/scripts/lua_environment.hpp" #include "lib/metrics/metrics.hpp" diff --git a/src/lua/scripts/script_environment.cpp b/src/lua/scripts/script_environment.cpp index 4a7ad7acd94..e1c5e3a9c85 100644 --- a/src/lua/scripts/script_environment.cpp +++ b/src/lua/scripts/script_environment.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "lua/scripts/luascript.hpp" #include "lua/scripts/script_environment.hpp" diff --git a/src/lua/scripts/scripts.cpp b/src/lua/scripts/scripts.cpp index cb92c1cc29a..3a35750c1af 100644 --- a/src/lua/scripts/scripts.cpp +++ b/src/lua/scripts/scripts.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/imbuements/imbuements.hpp" #include "lua/global/globalevent.hpp" #include "items/weapons/weapons.hpp" diff --git a/src/main.cpp b/src/main.cpp index be289d397f6..8534bbb6911 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,7 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" #include "canary_server.hpp" #include "lib/di/container.hpp" diff --git a/src/map/house/house.cpp b/src/map/house/house.cpp index f2cb26114bf..ba5e782e5de 100644 --- a/src/map/house/house.cpp +++ b/src/map/house/house.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "utils/pugicast.hpp" #include "map/house/house.hpp" #include "io/iologindata.hpp" diff --git a/src/map/house/housetile.cpp b/src/map/house/housetile.cpp index 5e728a14ea3..8a3217cc011 100644 --- a/src/map/house/housetile.cpp +++ b/src/map/house/housetile.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "items/tile.hpp" #include "creatures/monsters/monster.hpp" #include "map/house/housetile.hpp" diff --git a/src/map/map.cpp b/src/map/map.cpp index b1706be0759..ce73464b80c 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "map.hpp" #include "utils/astarnodes.hpp" diff --git a/src/map/mapcache.cpp b/src/map/mapcache.cpp index ad3c909a8bf..33a069f5ae9 100644 --- a/src/map/mapcache.cpp +++ b/src/map/mapcache.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "mapcache.hpp" #include "game/movement/teleport.hpp" diff --git a/src/map/spectators.cpp b/src/map/spectators.cpp index 405119b83e9..29c81617019 100644 --- a/src/map/spectators.cpp +++ b/src/map/spectators.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "spectators.hpp" #include "game/game.hpp" diff --git a/src/map/utils/astarnodes.cpp b/src/map/utils/astarnodes.cpp index e7c5b7ce48e..4645cd30b62 100644 --- a/src/map/utils/astarnodes.cpp +++ b/src/map/utils/astarnodes.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "astarnodes.hpp" #include "creatures/monsters/monster.hpp" #include "creatures/combat/combat.hpp" diff --git a/src/map/utils/mapsector.cpp b/src/map/utils/mapsector.cpp index de036728b76..064ff837e8b 100644 --- a/src/map/utils/mapsector.cpp +++ b/src/map/utils/mapsector.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/creature.hpp" #include "mapsector.hpp" diff --git a/src/pch.cpp b/src/pch.cpp new file mode 100644 index 00000000000..c76b9e42cf8 --- /dev/null +++ b/src/pch.cpp @@ -0,0 +1,11 @@ +/** + * 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/ + */ + +// The visual studio solution requires a pch.cpp including the pch.hpp +#include "pch.hpp" diff --git a/src/security/argon.cpp b/src/security/argon.cpp index fe11ab0724a..41b65b64908 100644 --- a/src/security/argon.cpp +++ b/src/security/argon.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "config/configmanager.hpp" #include "database/database.hpp" #include "security/argon.hpp" diff --git a/src/security/rsa.cpp b/src/security/rsa.cpp index fc28d931f66..220ba94a43d 100644 --- a/src/security/rsa.cpp +++ b/src/security/rsa.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "lib/di/container.hpp" #include "security/rsa.hpp" diff --git a/src/server/network/connection/connection.cpp b/src/server/network/connection/connection.cpp index a3782d56cba..b5ebdebc648 100644 --- a/src/server/network/connection/connection.cpp +++ b/src/server/network/connection/connection.cpp @@ -7,14 +7,20 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "server/network/connection/connection.hpp" + +#include "config/configmanager.hpp" +#include "lib/di/container.hpp" #include "server/network/message/outputmessage.hpp" #include "server/network/protocol/protocol.hpp" #include "game/scheduling/dispatcher.hpp" +#include "server/network/message/networkmessage.hpp" #include "server/server.hpp" +ConnectionManager &ConnectionManager::getInstance() { + return inject(); +} + Connection_ptr ConnectionManager::createConnection(asio::io_service &io_service, ConstServicePort_ptr servicePort) { auto connection = std::make_shared(io_service, servicePort); connections.emplace(connection); @@ -47,7 +53,7 @@ Connection::Connection(asio::io_service &initIoService, ConstServicePort_ptr ini readTimer(initIoService), writeTimer(initIoService), service_port(std::move(initservicePort)), - socket(initIoService) { + socket(initIoService), m_msg() { } void Connection::close(bool force) { @@ -108,7 +114,7 @@ void Connection::acceptInternal(bool toggleParseHeader) { readTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); }); try { - asio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this(), toggleParseHeader](const std::error_code &error, std::size_t N) { + asio::async_read(socket, asio::buffer(m_msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this(), toggleParseHeader](const std::error_code &error, std::size_t N) { if (toggleParseHeader) { self->parseHeader(error); } else { @@ -132,7 +138,7 @@ void Connection::parseProxyIdentification(const std::error_code &error) { return; } - uint8_t* msgBuffer = msg.getBuffer(); + uint8_t* msgBuffer = m_msg.getBuffer(); auto charData = static_cast(static_cast(msgBuffer)); std::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + "\n"; if (connectionState == CONNECTION_STATE_IDENTIFYING) { @@ -150,7 +156,7 @@ void Connection::parseProxyIdentification(const std::error_code &error) { readTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); }); // Read the remainder of proxy identification - asio::async_read(socket, asio::buffer(msg.getBuffer(), remainder), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseProxyIdentification(error); }); + asio::async_read(socket, asio::buffer(m_msg.getBuffer(), remainder), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseProxyIdentification(error); }); } catch (const std::system_error &e) { g_logger().error("Connection::parseProxyIdentification] - error: {}", e.what()); close(FORCE_CLOSE); @@ -200,7 +206,7 @@ void Connection::parseHeader(const std::error_code &error) { packetsSent = 0; } - uint16_t size = msg.getLengthHeader(); + uint16_t size = m_msg.getLengthHeader(); if (size == 0 || size > INPUTMESSAGE_MAXSIZE) { close(FORCE_CLOSE); return; @@ -211,9 +217,9 @@ void Connection::parseHeader(const std::error_code &error) { readTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); }); // Read packet content - msg.setLength(size + HEADER_LENGTH); + m_msg.setLength(size + HEADER_LENGTH); // Read the remainder of proxy identification - asio::async_read(socket, asio::buffer(msg.getBodyBuffer(), size), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parsePacket(error); }); + asio::async_read(socket, asio::buffer(m_msg.getBodyBuffer(), size), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parsePacket(error); }); } catch (const std::system_error &e) { g_logger().error("[Connection::parseHeader] - error: {}", e.what()); close(FORCE_CLOSE); @@ -240,21 +246,21 @@ void Connection::parsePacket(const std::error_code &error) { if (!protocol) { // Check packet checksum uint32_t checksum; - if (int32_t len = msg.getLength() - msg.getBufferPosition() - CHECKSUM_LENGTH; + if (int32_t len = m_msg.getLength() - m_msg.getBufferPosition() - CHECKSUM_LENGTH; len > 0) { - checksum = adlerChecksum(msg.getBuffer() + msg.getBufferPosition() + CHECKSUM_LENGTH, len); + checksum = adlerChecksum(m_msg.getBuffer() + m_msg.getBufferPosition() + CHECKSUM_LENGTH, len); } else { checksum = 0; } - uint32_t recvChecksum = msg.get(); + uint32_t recvChecksum = m_msg.get(); if (recvChecksum != checksum) { // it might not have been the checksum, step back - msg.skipBytes(-CHECKSUM_LENGTH); + m_msg.skipBytes(-CHECKSUM_LENGTH); } // Game protocol has already been created at this point - protocol = service_port->make_protocol(recvChecksum == checksum, msg, shared_from_this()); + protocol = service_port->make_protocol(recvChecksum == checksum, m_msg, shared_from_this()); if (!protocol) { close(FORCE_CLOSE); return; @@ -262,15 +268,15 @@ void Connection::parsePacket(const std::error_code &error) { } else { // It is rather hard to detect if we have checksum or sequence method here so let's skip checksum check // it doesn't generate any problem because olders protocol don't use 'server sends first' feature - msg.get(); + m_msg.get(); // Skip protocol ID - msg.skipBytes(1); + m_msg.skipBytes(1); } - protocol->onRecvFirstMessage(msg); + protocol->onRecvFirstMessage(m_msg); } else { // Send the packet to the current protocol - skipReadingNextPacket = protocol->onRecvMessage(msg); + skipReadingNextPacket = protocol->onRecvMessage(m_msg); } try { @@ -279,7 +285,7 @@ void Connection::parsePacket(const std::error_code &error) { if (!skipReadingNextPacket) { // Wait to the next packet - asio::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); }); + asio::async_read(socket, asio::buffer(m_msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseHeader(error); }); } } catch (const std::system_error &e) { g_logger().error("[Connection::parsePacket] - error: {}", e.what()); @@ -292,7 +298,7 @@ void Connection::resumeWork() { readTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); }); try { - asio::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); }); + asio::async_read(socket, asio::buffer(m_msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseHeader(error); }); } catch (const std::system_error &e) { g_logger().error("[Connection::resumeWork] - Exception in async_read: {}", e.what()); close(FORCE_CLOSE); diff --git a/src/server/network/connection/connection.hpp b/src/server/network/connection/connection.hpp index 76d9b1c1876..0666ef35d8d 100644 --- a/src/server/network/connection/connection.hpp +++ b/src/server/network/connection/connection.hpp @@ -10,7 +10,7 @@ #pragma once #include "declarations.hpp" -#include "lib/di/container.hpp" +// TODO: Remove circular includes (maybe shared_ptr?) #include "server/network/message/networkmessage.hpp" static constexpr int32_t CONNECTION_WRITE_TIMEOUT = 30; @@ -28,14 +28,13 @@ using Service_ptr = std::shared_ptr; class ServicePort; using ServicePort_ptr = std::shared_ptr; using ConstServicePort_ptr = std::shared_ptr; +class NetworkMessage; class ConnectionManager { public: ConnectionManager() = default; - static ConnectionManager &getInstance() { - return inject(); - } + static ConnectionManager &getInstance(); Connection_ptr createConnection(asio::io_service &io_service, ConstServicePort_ptr servicePort); void releaseConnection(const Connection_ptr &connection); @@ -86,8 +85,6 @@ class Connection : public std::enable_shared_from_this { return socket; } - NetworkMessage msg; - asio::high_resolution_timer readTimer; asio::high_resolution_timer writeTimer; @@ -100,6 +97,8 @@ class Connection : public std::enable_shared_from_this { asio::ip::tcp::socket socket; + NetworkMessage m_msg; + std::time_t timeConnected = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); uint32_t packetsSent = 0; uint32_t ip = 1; diff --git a/src/server/network/message/networkmessage.cpp b/src/server/network/message/networkmessage.cpp index d8cb599a07c..3f7147e8411 100644 --- a/src/server/network/message/networkmessage.cpp +++ b/src/server/network/message/networkmessage.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "server/network/message/networkmessage.hpp" #include "items/containers/container.hpp" diff --git a/src/server/network/message/outputmessage.cpp b/src/server/network/message/outputmessage.cpp index efed7fe8367..bb4dab4526d 100644 --- a/src/server/network/message/outputmessage.cpp +++ b/src/server/network/message/outputmessage.cpp @@ -7,14 +7,18 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "outputmessage.hpp" + +#include "lib/di/container.hpp" #include "server/network/protocol/protocol.hpp" #include "game/scheduling/dispatcher.hpp" const std::chrono::milliseconds OUTPUTMESSAGE_AUTOSEND_DELAY { 10 }; +OutputMessagePool &OutputMessagePool::getInstance() { + return inject(); +} + void OutputMessagePool::scheduleSendAll() { g_dispatcher().scheduleEvent( OUTPUTMESSAGE_AUTOSEND_DELAY.count(), [this] { sendAll(); }, "OutputMessagePool::sendAll" diff --git a/src/server/network/message/outputmessage.hpp b/src/server/network/message/outputmessage.hpp index 459e243cea3..a7e2e72d63f 100644 --- a/src/server/network/message/outputmessage.hpp +++ b/src/server/network/message/outputmessage.hpp @@ -93,9 +93,7 @@ class OutputMessagePool { OutputMessagePool(const OutputMessagePool &) = delete; OutputMessagePool &operator=(const OutputMessagePool &) = delete; - static OutputMessagePool &getInstance() { - return inject(); - } + static OutputMessagePool &getInstance(); void sendAll(); void scheduleSendAll(); diff --git a/src/server/network/protocol/protocol.cpp b/src/server/network/protocol/protocol.cpp index c40ead17ab0..ce3d1339648 100644 --- a/src/server/network/protocol/protocol.cpp +++ b/src/server/network/protocol/protocol.cpp @@ -7,13 +7,17 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "server/network/protocol/protocol.hpp" + +#include "config/configmanager.hpp" +#include "server/network/connection/connection.hpp" #include "server/network/message/outputmessage.hpp" #include "security/rsa.hpp" #include "game/scheduling/dispatcher.hpp" +Protocol::Protocol(Connection_ptr initConnection) : + connectionPtr(initConnection) { } + void Protocol::onSendMessage(const OutputMessage_ptr &msg) { if (!rawMessages) { const uint32_t sendMessageChecksum = msg->getLength() >= 128 && compression(*msg) ? (1U << 31) : 0; @@ -109,17 +113,29 @@ OutputMessage_ptr Protocol::getOutputBuffer(int32_t size) { return outputBuffer; } -void Protocol::XTEA_encrypt(OutputMessage &msg) const { +void Protocol::send(OutputMessage_ptr msg) const { + if (auto connection = getConnection()) { + connection->send(msg); + } +} + +void Protocol::disconnect() const { + if (auto connection = getConnection()) { + connection->close(); + } +} + +void Protocol::XTEA_encrypt(OutputMessage &outputMessage) const { const uint32_t delta = 0x61C88647; // The message must be a multiple of 8 - size_t paddingBytes = msg.getLength() & 7; + size_t paddingBytes = outputMessage.getLength() & 7; if (paddingBytes != 0) { - msg.addPaddingBytes(8 - paddingBytes); + outputMessage.addPaddingBytes(8 - paddingBytes); } - uint8_t* buffer = msg.getOutputBuffer(); - auto messageLength = static_cast(msg.getLength()); + uint8_t* buffer = outputMessage.getOutputBuffer(); + auto messageLength = static_cast(outputMessage.getLength()); int32_t readPos = 0; const std::array newKey = { key[0], key[1], key[2], key[3] }; // TODO: refactor this for not use c-style @@ -193,6 +209,14 @@ bool Protocol::RSA_decrypt(NetworkMessage &msg) { return (msg.getByte() == 0); } +bool Protocol::isConnectionExpired() const { + return connectionPtr.expired(); +} + +Connection_ptr Protocol::getConnection() const { + return connectionPtr.lock(); +} + uint32_t Protocol::getIP() const { if (auto protocolConnection = getConnection()) { return protocolConnection->getIP(); @@ -201,7 +225,7 @@ uint32_t Protocol::getIP() const { return 0; } -bool Protocol::compression(OutputMessage &msg) const { +bool Protocol::compression(OutputMessage &outputMessage) const { if (checksumMethod != CHECKSUM_METHOD_SEQUENCE) { return false; } @@ -211,13 +235,13 @@ bool Protocol::compression(OutputMessage &msg) const { return false; } - const auto outputMessageSize = msg.getLength(); + const auto outputMessageSize = outputMessage.getLength(); if (outputMessageSize > NETWORKMESSAGE_MAXSIZE) { g_logger().error("[NetworkMessage::compression] - Exceded NetworkMessage max size: {}, actually size: {}", NETWORKMESSAGE_MAXSIZE, outputMessageSize); return false; } - compress->stream->next_in = msg.getOutputBuffer(); + compress->stream->next_in = outputMessage.getOutputBuffer(); compress->stream->avail_in = outputMessageSize; compress->stream->next_out = reinterpret_cast(compress->buffer.data()); compress->stream->avail_out = NETWORKMESSAGE_MAXSIZE; @@ -234,8 +258,25 @@ bool Protocol::compression(OutputMessage &msg) const { return false; } - msg.reset(); - msg.addBytes(compress->buffer.data(), totalSize); + outputMessage.reset(); + outputMessage.addBytes(compress->buffer.data(), totalSize); return true; } + +Protocol::ZStream::ZStream() noexcept { + const int32_t compressionLevel = g_configManager().getNumber(COMPRESSION_LEVEL, __FUNCTION__); + if (compressionLevel <= 0) { + return; + } + + stream = std::make_unique(); + stream->zalloc = nullptr; + stream->zfree = nullptr; + stream->opaque = nullptr; + + if (deflateInit2(stream.get(), compressionLevel, Z_DEFLATED, -15, 9, Z_DEFAULT_STRATEGY) != Z_OK) { + stream.reset(); + g_logger().error("[Protocol::enableCompression()] - Zlib deflateInit2 error: {}", (stream->msg ? stream->msg : " unknown error")); + } +} diff --git a/src/server/network/protocol/protocol.hpp b/src/server/network/protocol/protocol.hpp index 54e3dcfd4c3..033e2069ff5 100644 --- a/src/server/network/protocol/protocol.hpp +++ b/src/server/network/protocol/protocol.hpp @@ -9,13 +9,19 @@ #pragma once -#include "server/network/connection/connection.hpp" -#include "config/configmanager.hpp" +#include "server/server_definitions.hpp" + +class OutputMessage; +using OutputMessage_ptr = std::shared_ptr; +class Connection; +using Connection_ptr = std::shared_ptr; +using ConnectionWeak_ptr = std::weak_ptr; + +class NetworkMessage; class Protocol : public std::enable_shared_from_this { public: - explicit Protocol(Connection_ptr initConnection) : - connectionPtr(initConnection) { } + explicit Protocol(Connection_ptr initConnection); virtual ~Protocol() = default; @@ -31,13 +37,9 @@ class Protocol : public std::enable_shared_from_this { virtual void onRecvFirstMessage(NetworkMessage &msg) = 0; virtual void onConnect() { } - bool isConnectionExpired() const { - return connectionPtr.expired(); - } + bool isConnectionExpired() const; - Connection_ptr getConnection() const { - return connectionPtr.lock(); - } + Connection_ptr getConnection() const; uint32_t getIP() const; @@ -48,19 +50,10 @@ class Protocol : public std::enable_shared_from_this { return outputBuffer; } - void send(OutputMessage_ptr msg) const { - if (auto connection = getConnection(); - connection != nullptr) { - connection->send(msg); - } - } + void send(OutputMessage_ptr msg) const; protected: - void disconnect() const { - if (auto connection = getConnection()) { - connection->close(); - } - } + void disconnect() const; void enableXTEAEncryption() { encryptionEnabled = true; @@ -82,22 +75,7 @@ class Protocol : public std::enable_shared_from_this { private: struct ZStream { - ZStream() noexcept { - const int32_t compressionLevel = g_configManager().getNumber(COMPRESSION_LEVEL, __FUNCTION__); - if (compressionLevel <= 0) { - return; - } - - stream = std::make_unique(); - stream->zalloc = nullptr; - stream->zfree = nullptr; - stream->opaque = nullptr; - - if (deflateInit2(stream.get(), compressionLevel, Z_DEFLATED, -15, 9, Z_DEFAULT_STRATEGY) != Z_OK) { - stream.reset(); - g_logger().error("[Protocol::enableCompression()] - Zlib deflateInit2 error: {}", (stream->msg ? stream->msg : " unknown error")); - } - } + ZStream() noexcept; ~ZStream() { deflateEnd(stream.get()); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 560ae1168c5..e3d94942670 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "creatures/players/management/ban.hpp" #include "core.hpp" #include "declarations.hpp" @@ -984,7 +982,7 @@ void ProtocolGame::addBless() { player->checkAndShowBlessingMessage(); } -void ProtocolGame::parsePacketFromDispatcher(NetworkMessage msg, uint8_t recvbyte) { +void ProtocolGame::parsePacketFromDispatcher(NetworkMessage &msg, uint8_t recvbyte) { if (!acceptPackets || g_game().getGameState() == GAME_STATE_SHUTDOWN) { return; } diff --git a/src/server/network/protocol/protocolgame.hpp b/src/server/network/protocol/protocolgame.hpp index 769771c975a..fe83ed01cf1 100644 --- a/src/server/network/protocol/protocolgame.hpp +++ b/src/server/network/protocol/protocolgame.hpp @@ -96,7 +96,7 @@ class ProtocolGame final : public Protocol { // we have all the parse methods void parsePacket(NetworkMessage &msg) override; - void parsePacketFromDispatcher(NetworkMessage msg, uint8_t recvbyte); + void parsePacketFromDispatcher(NetworkMessage &msg, uint8_t recvbyte); void onRecvFirstMessage(NetworkMessage &msg) override; void onConnect() override; diff --git a/src/server/network/protocol/protocollogin.cpp b/src/server/network/protocol/protocollogin.cpp index 9cf6cc1c370..d3ee6030e1d 100644 --- a/src/server/network/protocol/protocollogin.cpp +++ b/src/server/network/protocol/protocollogin.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "server/network/protocol/protocollogin.hpp" #include "server/network/message/outputmessage.hpp" #include "game/scheduling/dispatcher.hpp" diff --git a/src/server/network/protocol/protocolstatus.cpp b/src/server/network/protocol/protocolstatus.cpp index 1e7e68e1542..4239d6f2300 100644 --- a/src/server/network/protocol/protocolstatus.cpp +++ b/src/server/network/protocol/protocolstatus.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "core.hpp" #include "server/network/protocol/protocolstatus.hpp" diff --git a/src/server/network/webhook/webhook.cpp b/src/server/network/webhook/webhook.cpp index f80ff4e59b3..7ee4ca31f09 100644 --- a/src/server/network/webhook/webhook.cpp +++ b/src/server/network/webhook/webhook.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "server/network/webhook/webhook.hpp" #include "config/configmanager.hpp" #include "game/scheduling/dispatcher.hpp" diff --git a/src/server/server.cpp b/src/server/server.cpp index fc8690468fe..5ed528f5045 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "server/network/message/outputmessage.hpp" #include "server/server.hpp" #include "config/configmanager.hpp" diff --git a/src/server/server_definitions.hpp b/src/server/server_definitions.hpp index b957292b579..79dd89df511 100644 --- a/src/server/server_definitions.hpp +++ b/src/server/server_definitions.hpp @@ -9,6 +9,8 @@ #pragma once +#include "utils/const.hpp" + // Enums // Connection and networkmessage. enum { FORCE_CLOSE = true }; diff --git a/src/server/signals.cpp b/src/server/signals.cpp index ae71d833c93..cb4e083b60c 100644 --- a/src/server/signals.cpp +++ b/src/server/signals.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "game/game.hpp" #include "game/scheduling/dispatcher.hpp" #include "game/scheduling/save_manager.hpp" diff --git a/src/utils/pugicast.cpp b/src/utils/pugicast.cpp index 62717c33621..2269e62b1fb 100644 --- a/src/utils/pugicast.cpp +++ b/src/utils/pugicast.cpp @@ -6,7 +6,7 @@ * Contributors: https://github.com/opentibiabr/canary/graphs/contributors * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" + #include "lib/logging/log_with_spd_log.hpp" namespace pugi { diff --git a/src/utils/tools.cpp b/src/utils/tools.cpp index f89b2c2f217..8df1fde1065 100644 --- a/src/utils/tools.cpp +++ b/src/utils/tools.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "core.hpp" #include "items/item.hpp" #include "utils/tools.hpp" diff --git a/src/utils/wildcardtree.cpp b/src/utils/wildcardtree.cpp index 4fd830b64cb..a8ddf98e442 100644 --- a/src/utils/wildcardtree.cpp +++ b/src/utils/wildcardtree.cpp @@ -7,8 +7,6 @@ * Website: https://docs.opentibiabr.com/ */ -#include "pch.hpp" - #include "utils/wildcardtree.hpp" std::shared_ptr WildcardTreeNode::getChild(char ch) { diff --git a/tests/build_and_run.sh b/tests/build_and_run.sh index ac4ccad512c..f885525353f 100755 --- a/tests/build_and_run.sh +++ b/tests/build_and_run.sh @@ -1,14 +1,22 @@ #!/usr/bin/env bash +# Clean up existing containers, images and volumes and start over docker-compose down --rmi all -v --remove-orphans docker-compose up --build -d + +# Check if the build directory exists, if it doesn't exist it creates it cd .. if [ ! -d "build" ]; then mkdir build fi cd build || exit -cmake -DCMAKE_BUILD_TYPE=Debug -DPACKAGE_TESTS=On .. ; make -j"$(nproc)" + +# Configure the build using vcpkg and compile the project with 6 threads +cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DPACKAGE_TESTS=On .. ; make -j"$(nproc)" + +# Run tests after compilation ./tests/unit/canary_ut --reporter compact --success -cd .. -cd tests || exit + +# Go back to the tests folder and clean the Docker environment again +cd ../tests || exit docker-compose down --rmi all -v --remove-orphans diff --git a/tests/integration/main.cpp b/tests/integration/main.cpp index 3a34285f163..6fb0c291e49 100644 --- a/tests/integration/main.cpp +++ b/tests/integration/main.cpp @@ -1,6 +1,7 @@ #include #include "account/account_repository_db.hpp" +#include "database/database.hpp" #include "lib/logging/in_memory_logger.hpp" #include "utils/tools.hpp" #include "enums/account_type.hpp" diff --git a/vcproj/canary.vcxproj b/vcproj/canary.vcxproj index 77ece957935..eafe0b8000c 100644 --- a/vcproj/canary.vcxproj +++ b/vcproj/canary.vcxproj @@ -414,9 +414,10 @@ - + Create Create + Create @@ -544,7 +545,7 @@ Level1 true stdcpp20 - + pch.hpp true ProgramDatabase true @@ -552,6 +553,7 @@ true /Zc:__cplusplus %(AdditionalOptions) _DISABLE_VECTOR_ANNOTATION;_DISABLE_STRING_ANNOTATION;NDEBUG;%(PreprocessorDefinitions) + Use Console @@ -594,14 +596,15 @@ false + NotUsing false + NotUsing - - + \ No newline at end of file From b503adbe3c346f403173ed65ca2f34d566fc1453 Mon Sep 17 00:00:00 2001 From: HT Cesta <58153179+htc16@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:12:07 -0300 Subject: [PATCH 14/29] fix: quests from version 10 revised (#2855) --- data-otservbr-global/lib/core/constants.lua | 33 - data-otservbr-global/lib/core/quests.lua | 190 ++- data-otservbr-global/lib/core/storages.lua | 1156 +++++++++-------- .../monster/humans/necromancer_servant.lua | 13 +- .../dark_trails/death_priest_shargon.lua | 6 +- .../bosses/ascending_ferumbras.lua | 0 .../bosses/death_dragon.lua | 0 .../bosses/destabilized_ferumbras.lua | 0 .../bosses/enraged_soul.lua | 0 .../bosses/ferumbras_mortal_shell.lua | 0 .../bosses/ferumbras_soul_splinter.lua | 0 .../bosses/mazoran.lua | 0 .../bosses/plagirath.lua | 0 .../bosses/ragiaz.lua | 0 .../bosses/razzagorn.lua | 0 .../bosses/redeemed_soul.lua | 0 .../bosses/shulgrax.lua | 0 .../bosses/sin_devourer.lua | 0 .../bosses/tarbaz.lua | 0 .../bosses/the_lord_of_the_lice.lua | 0 .../bosses/the_shatterer.lua | 0 .../bosses/zamulosh.lua | 0 .../bosses/zamulosh2.lua | 4 - .../bosses/zamulosh3.lua | 1 - .../damned_soul.lua | 0 .../desperate_soul.lua | 0 .../disgusting_ooze.lua | 0 .../ferumbras_essence.lua | 0 .../lovely/lovely_deer.lua | 0 .../lovely/lovely_frazzlemaw.lua | 0 .../lovely/lovely_polar_bear.lua | 0 .../lovely/lovely_rotworm.lua | 0 .../lovely/lovely_scorpion.lua | 0 .../lovely/lovely_snake.lua | 0 .../lovely/lovely_souleater.lua | 0 .../lovely/lovely_yielothax.lua | 0 .../rage_of_mazoran.lua | 0 .../summons/enthralled_demon.lua | 0 .../summons/rift_fragment.lua | 0 .../summons/rift_invader.lua | 0 .../traps/bone_capsule.lua | 0 .../traps/despair.lua | 0 .../traps/electric_sparks.lua | 0 .../traps/eruption_of_destruction.lua | 0 .../traps/guilt.lua | 0 .../traps/void.lua | 0 data-otservbr-global/npc/a_beggar.lua | 6 +- data-otservbr-global/npc/a_behemoth.lua | 4 +- data-otservbr-global/npc/a_dragon_lord.lua | 4 +- data-otservbr-global/npc/a_drillworm.lua | 4 +- data-otservbr-global/npc/a_lost_basher.lua | 4 +- data-otservbr-global/npc/a_lost_husher.lua | 4 +- data-otservbr-global/npc/a_lost_thrower.lua | 4 +- .../npc/a_nightmare_scion.lua | 4 +- data-otservbr-global/npc/a_strange_fellow.lua | 4 +- data-otservbr-global/npc/a_sweaty_cyclops.lua | 8 +- data-otservbr-global/npc/a_vulcongra.lua | 4 +- data-otservbr-global/npc/a_wyrm.lua | 4 +- data-otservbr-global/npc/ahmet.lua | 8 +- data-otservbr-global/npc/ajax.lua | 4 +- data-otservbr-global/npc/alia.lua | 4 +- data-otservbr-global/npc/amanda.lua | 12 +- data-otservbr-global/npc/arito.lua | 12 +- data-otservbr-global/npc/azalea.lua | 4 +- data-otservbr-global/npc/barazbaz.lua | 22 +- data-otservbr-global/npc/barnabas_dee.lua | 54 +- data-otservbr-global/npc/benjamin.lua | 6 +- data-otservbr-global/npc/bertram.lua | 2 +- data-otservbr-global/npc/boozer.lua | 10 +- data-otservbr-global/npc/brewster.lua | 4 +- data-otservbr-global/npc/brodrosch.lua | 4 +- data-otservbr-global/npc/budrik.lua | 14 +- data-otservbr-global/npc/captain_bluebear.lua | 4 +- data-otservbr-global/npc/captain_haba.lua | 2 +- data-otservbr-global/npc/captain_seahorse.lua | 4 +- data-otservbr-global/npc/cedrik.lua | 4 +- data-otservbr-global/npc/chantalle.lua | 2 +- data-otservbr-global/npc/charos.lua | 8 +- data-otservbr-global/npc/chavis.lua | 44 +- data-otservbr-global/npc/chrystal.lua | 6 +- data-otservbr-global/npc/corym_ratter.lua | 2 +- data-otservbr-global/npc/costello.lua | 14 +- data-otservbr-global/npc/dalbrect.lua | 8 +- data-otservbr-global/npc/daniel_steelsoul.lua | 10 +- data-otservbr-global/npc/dermot.lua | 4 +- data-otservbr-global/npc/doubleday.lua | 107 ++ data-otservbr-global/npc/dove.lua | 6 +- data-otservbr-global/npc/elliott.lua | 76 +- data-otservbr-global/npc/elyen_ravenlock.lua | 20 +- data-otservbr-global/npc/erayo.lua | 2 +- data-otservbr-global/npc/eroth.lua | 8 +- data-otservbr-global/npc/ezebeth.lua | 40 +- data-otservbr-global/npc/ferus.lua | 4 +- data-otservbr-global/npc/gnomargery.lua | 73 +- data-otservbr-global/npc/gnombold.lua | 68 +- data-otservbr-global/npc/gnome_trooper.lua | 59 +- data-otservbr-global/npc/gnomilly.lua | 65 +- data-otservbr-global/npc/gnommander.lua | 1 + data-otservbr-global/npc/hairycles.lua | 8 +- data-otservbr-global/npc/hugo.lua | 8 +- data-otservbr-global/npc/iptar-sin.lua | 4 +- data-otservbr-global/npc/isimov.lua | 4 +- data-otservbr-global/npc/jack.lua | 38 +- data-otservbr-global/npc/jacob.lua | 74 +- data-otservbr-global/npc/jondrin.lua | 31 +- data-otservbr-global/npc/jorge.lua | 109 +- data-otservbr-global/npc/kasmir.lua | 4 +- data-otservbr-global/npc/kazzan.lua | 12 +- data-otservbr-global/npc/kevin.lua | 130 +- data-otservbr-global/npc/kjesse.lua | 4 +- data-otservbr-global/npc/kroox.lua | 6 +- data-otservbr-global/npc/liane.lua | 6 +- data-otservbr-global/npc/lokur.lua | 4 +- data-otservbr-global/npc/lorietta.lua | 4 +- data-otservbr-global/npc/maealil.lua | 4 +- data-otservbr-global/npc/maeryn.lua | 4 +- data-otservbr-global/npc/markwin.lua | 4 +- data-otservbr-global/npc/marvin.lua | 15 +- data-otservbr-global/npc/mazarius.lua | 130 +- data-otservbr-global/npc/mother_of_jack.lua | 6 +- data-otservbr-global/npc/muhad.lua | 6 +- data-otservbr-global/npc/muriel.lua | 10 +- data-otservbr-global/npc/ninev.lua | 4 +- data-otservbr-global/npc/ninos.lua | 6 +- data-otservbr-global/npc/noodles.lua | 12 +- data-otservbr-global/npc/oblivion.lua | 20 +- data-otservbr-global/npc/olrik.lua | 6 +- data-otservbr-global/npc/omrabas.lua | 239 ++-- data-otservbr-global/npc/one_eyed_joe.lua | 115 +- data-otservbr-global/npc/padreia.lua | 10 +- data-otservbr-global/npc/prezil.lua | 4 +- data-otservbr-global/npc/quandons_ghost.lua | 25 +- data-otservbr-global/npc/queen_eloise.lua | 4 +- data-otservbr-global/npc/quentin.lua | 4 +- data-otservbr-global/npc/rabaz.lua | 12 +- data-otservbr-global/npc/rahkem.lua | 4 +- .../npc/rock_with_a_soft_spot.lua | 4 +- data-otservbr-global/npc/roswitha.lua | 8 +- data-otservbr-global/npc/sandomo.lua | 32 +- data-otservbr-global/npc/sholley.lua | 22 +- data-otservbr-global/npc/sister_of_jack.lua | 8 +- data-otservbr-global/npc/spectulus.lua | 28 +- data-otservbr-global/npc/talphion.lua | 4 +- data-otservbr-global/npc/tarun.lua | 10 +- .../npc/tereban_functions.lua | 48 +- data-otservbr-global/npc/terrence.lua | 22 +- data-otservbr-global/npc/the_beggar_king.lua | 5 +- data-otservbr-global/npc/tomruk_the_ruddy.lua | 25 +- data-otservbr-global/npc/tyrias.lua | 4 +- data-otservbr-global/npc/ubaid.lua | 4 +- data-otservbr-global/npc/umar.lua | 4 +- data-otservbr-global/npc/uzon.lua | 4 +- data-otservbr-global/npc/yberius.lua | 4 +- data-otservbr-global/npc/zarifan.lua | 23 +- .../npc/zedrulon_the_fallen.lua | 4 +- .../adventurers_guild/adventurers_stone.lua | 2 +- .../actions/adventurers_guild/magic_door.lua | 6 +- .../scripts/actions/bosses_levers/mazoran.lua | 24 - .../actions/bosses_levers/plagirath.lua | 24 - .../scripts/actions/bosses_levers/ragiaz.lua | 30 - .../actions/bosses_levers/razzagorn.lua | 24 - .../actions/bosses_levers/shulgrax.lua | 24 - .../scripts/actions/bosses_levers/tarbaz.lua | 24 - .../actions/bosses_levers/zamulosh.lua | 33 - .../actions/object/moonlight_crystals.lua | 10 +- .../actions/other/construction_kits.lua | 12 +- .../scripts/actions/other/destroy.lua | 2 +- .../scripts/actions/other/gems.lua | 34 +- .../actions/other/others/quest_system2.lua | 18 +- .../scripts/actions/tools/skinning.lua | 8 +- .../actions/valuables/random_items.lua | 18 + .../creaturescripts/customs/freequests.lua | 42 +- .../others/map_attributes_loader.lua | 4 +- .../scripts/lib/register_actions.lua | 87 +- .../movements/teleport/adventurers_guild.lua | 4 +- .../movements/teleport/lower_roshamuul.lua | 28 - .../quests/dark_trails/actions_corpse.lua | 6 +- .../actions_lever_death_priest_shargon.lua | 80 +- .../dark_trails/actions_lever_the_ravager.lua | 24 +- ...aturescripts_kill_death_priest_shargon.lua | 11 +- .../creaturescripts_kill_the_ravager.lua | 4 +- .../movements_necrometer_tile_access.lua | 7 +- .../quests/fathers_burden/actions_corpse.lua | 4 +- .../actions_ferumbras_lever.lua | 86 -- .../ferumbras_ascendant/actions_rat_lever.lua | 49 - .../actions_the_shatterer_lever.lua | 51 - .../creaturescripts_bosses_kill.lua | 76 -- .../movements_boss_teleport.lua | 36 - .../movements_desperate_soul.lua | 18 - .../actions_bone_flute.lua | 4 +- .../actions_bone_flute_wall.lua | 4 +- .../actions_boots_of_homecoming.lua | 0 .../actions_color_levers.lua | 22 +- .../actions_ferumbras_amulet.lua | 0 .../actions_ferumbras_lever.lua | 104 ++ .../actions_ferumbras_mana_keg.lua | 0 .../actions_flower_puzzle_lever.lua | 9 +- .../actions_grave_flower.lua | 0 .../actions_habitat_corrupted.lua | 24 +- .../actions_habitat_desert.lua | 23 +- .../actions_habitat_dimension.lua | 23 +- .../actions_habitat_grass.lua | 23 +- .../actions_habitat_ice.lua | 23 +- .../actions_habitat_lever.lua | 4 +- .../actions_habitat_mushroom.lua | 23 +- .../actions_habitat_roshamuul.lua | 23 +- .../actions_habitat_venom.lua | 24 +- .../actions_lever_first.lua | 10 +- .../actions_lever_four.lua | 10 +- .../actions_lever_second.lua | 10 +- .../actions_lever_third.lua | 16 +- .../ferumbras_ascension/actions_mazoran.lua | 105 ++ .../actions_mysterious_scroll.lua | 4 +- .../ferumbras_ascension/actions_plagirath.lua | 102 ++ .../actions_purified_soul.lua | 0 .../ferumbras_ascension/actions_ragiaz.lua | 114 ++ .../ferumbras_ascension/actions_rat_lever.lua | 102 ++ .../ferumbras_ascension/actions_razzagorn.lua | 102 ++ .../actions_reward.lua | 4 +- .../actions_sacrifice.lua | 26 +- .../ferumbras_ascension/actions_shulgrax.lua | 102 ++ .../actions_statue.lua | 4 +- .../ferumbras_ascension/actions_tarbaz.lua | 102 ++ .../actions_tarbaz_notes.lua | 8 +- .../actions_teleportation_rod.lua | 15 +- .../actions_the_shatterer_lever.lua | 112 ++ .../actions_the_shatterer_levers.lua | 18 +- .../ferumbras_ascension/actions_zamulosh.lua | 116 ++ .../creaturescripts_bone_capsule.lua | 0 .../creaturescripts_bosses_kill.lua | 135 ++ .../creaturescripts_death_dragon.lua | 2 +- .../creaturescripts_disgusting_ooze_death.lua | 0 ...rescripts_ferumbras_mortal_shell_death.lua | 0 ...reaturescripts_ferumbras_soul_splinter.lua | 0 .../creaturescripts_rift_invader_death.lua | 24 +- .../creaturescripts_the_shatterer_kill.lua | 6 +- .../creaturescripts_zamulosh_clone.lua | 2 +- ...balevents_ferumbras_ascendant_effect_1.lua | 0 ...balevents_ferumbras_ascendant_effect_2.lua | 0 .../movements_blue_gem.lua | 24 +- .../movements_boss_teleport.lua | 79 ++ .../movements_desperate_soul.lua | 24 + .../movements_entrance.lua | 30 +- .../movements_flower_puzzle.lua | 0 .../movements_gate_of_deathstruction.lua | 2 +- .../movements_green_gem.lua | 24 +- .../movements_habitats_access.lua | 4 +- .../movements_lovely_monsters.lua | 15 +- .../movements_mazoran_fire.lua | 0 .../movements_plagirath_access.lua | 2 +- .../movements_razzagorn_access.lua | 2 +- .../movements_red_gem.lua | 30 +- .../movements_seal.lua | 45 +- .../movements_shulgrax_lever.lua | 2 +- .../movements_stair.lua | 14 +- .../movements_vortex.lua | 4 +- .../movements_zamulosh_teleport.lua | 6 +- .../formogar_mine_hoist/movements_hoist.lua | 2 +- .../quests/gravedigger/actions_flask.lua | 17 - .../gravedigger/actions_inscriptions.lua | 20 - .../quests/gravedigger/actions_monks.lua | 24 - .../actions_ancient_feud_entrances.lua | 2 +- .../quests/lions_rock/actions_lions_rock.lua | 28 +- .../lions_rock/movements_lions_rock.lua | 20 +- ...s_mono_detector_strange_probing_device.lua | 106 ++ .../actions_the_ancient_sewers.lua | 46 + .../actions_the_ancient_sewers.lua | 84 -- .../actions_blue_pollen.lua | 41 + .../actions_to_take_roots.lua | 20 +- .../others/actions_ectoplasm_container.lua | 4 +- .../others/actions_exterminator_flask.lua | 4 +- .../quests/others/actions_fire_bug.lua | 12 +- .../quests/others/actions_holy_water.lua | 53 +- .../others/actions_steal_from_thieves.lua | 4 +- .../actions_bone.lua | 0 .../actions_chalk.lua | 0 .../actions_gravel.lua | 0 .../actions_mixture.lua | 0 .../actions_mortar.lua | 0 .../actions_resonance_chamber.lua | 0 .../actions_trough.lua | 3 +- .../creaturescripts_lower_roshamuul.lua} | 0 .../movements_lower_roshamuul.lua | 50 + .../quests/spike_tasks/actions_fertilizer.lua | 6 +- .../spike_tasks/actions_ghost_detector.lua | 22 +- .../quests/spike_tasks/actions_lode_stone.lua | 58 +- .../quests/spike_tasks/actions_nests.lua | 8 +- .../spike_tasks/actions_spirit_shovel.lua | 8 +- .../spike_tasks/actions_thermometer.lua | 4 +- .../spike_tasks/actions_tuning_fork.lua | 6 +- .../creaturescripts_lower_spike_kill.lua | 6 +- .../creaturescripts_middle_spike_kill.lua | 6 +- .../creaturescripts_upper_spike_kill.lua | 6 +- .../the_cursed_crystal/actions_MedusaOil.lua | 55 +- .../the_cursed_crystal/actions_Misc.lua | 134 +- .../the_cursed_crystal/actions_Ointment.lua | 9 +- .../movements_StepIn_CursedCrystal.lua | 82 +- .../actions_amforas.lua | 4 +- .../actions_ashes.lua | 4 +- .../actions_blood.lua | 4 +- .../actions_bones.lua | 4 +- .../actions_bookcase.lua | 4 +- .../actions_brain.lua | 4 +- .../actions_caixa.lua | 4 +- .../actions_candles.lua | 4 +- .../actions_cape.lua | 4 +- .../actions_chalk.lua | 4 +- .../actions_flask.lua | 19 + .../actions_hallowed.lua | 4 +- .../actions_inscriptions.lua | 20 + .../actions_key1.lua | 2 +- .../actions_key2.lua | 10 +- .../actions_monks.lua | 24 + .../actions_palanca.lua | 6 +- .../actions_pyramids1.lua | 8 +- .../actions_pyramids2.lua | 12 +- .../actions_sacrifice.lua | 6 +- .../actions_scroll.lua | 6 +- .../actions_statue.lua | 10 +- .../actions_tears.lua | 4 +- .../actions_tincture.lua | 4 +- .../creaturescripts_necromancer_servant.lua | 12 + .../movements_dormitory_teleport.lua | 6 +- .../movements_necromancer_servant.lua | 7 +- .../movements_sacrifice_teleport.lua | 20 +- .../movements_teleport.lua | 8 +- .../actions_treasure.lua | 26 +- .../actions_warrior_skeleton.lua | 13 +- .../creaturescripts_the_great_dragon_hunt.lua | 2 +- .../moviments_pythius_boss_teleport.lua | 2 +- .../movement-find-remains.lua | 4 +- .../actions_the_outlaw_camp_quest.lua | 2 +- .../actions_package.lua | 4 +- .../actions_waldos_posthorn.lua | 4 +- .../movements_geomantic_charges.lua | 6 +- .../the_tainted_soul/actions_star_herb.lua | 6 +- .../actions_ultimate_booze_beer_bottle.lua | 4 +- .../quests/tinder_box/actions_reward.lua | 12 - .../actions_reward.lua | 23 + .../actions_tinder_box.lua | 2 + .../actions_ursagrodon.lua} | 18 +- .../movements_prohibit_entry.lua | 23 + .../to_blind_the_enemy_quest/mirror.lua | 4 +- data-otservbr-global/startup/tables/chest.lua | 77 +- .../startup/tables/corpse.lua | 21 +- .../startup/tables/door_quest.lua | 41 +- data-otservbr-global/startup/tables/item.lua | 540 +++++++- data-otservbr-global/startup/tables/lever.lua | 121 ++ .../startup/tables/teleport.lua | 9 - data-otservbr-global/world/otservbr-npc.xml | 9 + data/items/items.xml | 25 +- data/libs/functions/player.lua | 10 +- 352 files changed, 5429 insertions(+), 3169 deletions(-) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/ascending_ferumbras.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/death_dragon.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/destabilized_ferumbras.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/enraged_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/ferumbras_mortal_shell.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/ferumbras_soul_splinter.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/mazoran.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/plagirath.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/ragiaz.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/razzagorn.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/redeemed_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/shulgrax.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/sin_devourer.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/tarbaz.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/the_lord_of_the_lice.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/the_shatterer.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/zamulosh.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/zamulosh2.lua (98%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/bosses/zamulosh3.lua (98%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/damned_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/desperate_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/disgusting_ooze.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/ferumbras_essence.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_deer.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_frazzlemaw.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_polar_bear.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_rotworm.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_scorpion.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_snake.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_souleater.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/lovely/lovely_yielothax.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/rage_of_mazoran.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/summons/enthralled_demon.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/summons/rift_fragment.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/summons/rift_invader.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/traps/bone_capsule.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/traps/despair.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/traps/electric_sparks.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/traps/eruption_of_destruction.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/traps/guilt.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascendant => ferumbras_ascension}/traps/void.lua (100%) delete mode 100644 data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua delete mode 100644 data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua delete mode 100644 data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua delete mode 100644 data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua delete mode 100644 data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua delete mode 100644 data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua delete mode 100644 data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua delete mode 100644 data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_bone_flute.lua (86%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_bone_flute_wall.lua (70%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_boots_of_homecoming.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_color_levers.lua (57%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_ferumbras_amulet.lua (100%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_ferumbras_mana_keg.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_flower_puzzle_lever.lua (88%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_grave_flower.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_corrupted.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_desert.lua (93%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_dimension.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_grass.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_ice.lua (95%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_lever.lua (68%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_mushroom.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_roshamuul.lua (95%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_habitat_venom.lua (95%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_lever_first.lua (64%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_lever_four.lua (58%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_lever_second.lua (65%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_lever_third.lua (62%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_mysterious_scroll.lua (72%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_purified_soul.lua (100%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_reward.lua (88%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_sacrifice.lua (60%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_statue.lua (80%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_tarbaz_notes.lua (61%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_teleportation_rod.lua (59%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/actions_the_shatterer_levers.lua (80%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_bone_capsule.lua (100%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_death_dragon.lua (87%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_disgusting_ooze_death.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_ferumbras_mortal_shell_death.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_ferumbras_soul_splinter.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_rift_invader_death.lua (72%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_the_shatterer_kill.lua (93%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/creaturescripts_zamulosh_clone.lua (84%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/globalevents_ferumbras_ascendant_effect_1.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/globalevents_ferumbras_ascendant_effect_2.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_blue_gem.lua (73%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_entrance.lua (57%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_flower_puzzle.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_gate_of_deathstruction.lua (90%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_green_gem.lua (73%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_habitats_access.lua (88%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_lovely_monsters.lua (69%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_mazoran_fire.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_plagirath_access.lua (86%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_razzagorn_access.lua (87%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_red_gem.lua (67%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_seal.lua (63%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_shulgrax_lever.lua (86%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_stair.lua (60%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_vortex.lua (71%) rename data-otservbr-global/scripts/quests/{ferumbras_ascendant => ferumbras_ascension}/movements_zamulosh_teleport.lua (79%) delete mode 100644 data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua delete mode 100644 data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua delete mode 100644 data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua create mode 100644 data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua create mode 100644 data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua delete mode 100644 data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua create mode 100644 data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua rename data-otservbr-global/scripts/quests/oramond/{chavis_tasks => to_take_roots}/actions_to_take_roots.lua (60%) rename data-otservbr-global/scripts/quests/{lower_roshamuul => roshamuul_quest}/actions_bone.lua (100%) rename data-otservbr-global/scripts/quests/{lower_roshamuul => roshamuul_quest}/actions_chalk.lua (100%) rename data-otservbr-global/scripts/quests/{lower_roshamuul => roshamuul_quest}/actions_gravel.lua (100%) rename data-otservbr-global/scripts/quests/{lower_roshamuul => roshamuul_quest}/actions_mixture.lua (100%) rename data-otservbr-global/scripts/quests/{lower_roshamuul => roshamuul_quest}/actions_mortar.lua (100%) rename data-otservbr-global/scripts/quests/{lower_roshamuul => roshamuul_quest}/actions_resonance_chamber.lua (100%) rename data-otservbr-global/scripts/quests/{lower_roshamuul => roshamuul_quest}/actions_trough.lua (66%) rename data-otservbr-global/scripts/{creaturescripts/monster/lower_roshamuul.lua => quests/roshamuul_quest/creaturescripts_lower_roshamuul.lua} (100%) create mode 100644 data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_amforas.lua (70%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_ashes.lua (60%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_blood.lua (57%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_bones.lua (53%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_bookcase.lua (68%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_brain.lua (74%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_caixa.lua (55%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_candles.lua (62%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_cape.lua (58%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_chalk.lua (63%) create mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_hallowed.lua (61%) create mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_key1.lua (82%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_key2.lua (52%) create mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_palanca.lua (56%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_pyramids1.lua (53%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_pyramids2.lua (50%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_sacrifice.lua (61%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_scroll.lua (55%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_statue.lua (54%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_tears.lua (59%) rename data-otservbr-global/scripts/quests/{gravedigger => the_gravedigger_of_drefia}/actions_tincture.lua (60%) create mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua rename data-otservbr-global/scripts/quests/{adventurers_guild => the_great_dragon_hunt_quest}/actions_treasure.lua (63%) rename data-otservbr-global/scripts/quests/{adventurers_guild => the_great_dragon_hunt_quest}/actions_warrior_skeleton.lua (52%) rename data-otservbr-global/scripts/quests/{adventurers_guild => the_great_dragon_hunt_quest}/creaturescripts_the_great_dragon_hunt.lua (84%) delete mode 100644 data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua create mode 100644 data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua rename data-otservbr-global/scripts/quests/{tinder_box => tinder_box_quest_chyllfroest}/actions_tinder_box.lua (99%) rename data-otservbr-global/scripts/{actions/other/ursagrodon.lua => quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua} (71%) create mode 100644 data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua diff --git a/data-otservbr-global/lib/core/constants.lua b/data-otservbr-global/lib/core/constants.lua index 0672aa00c8d..e69de29bb2d 100644 --- a/data-otservbr-global/lib/core/constants.lua +++ b/data-otservbr-global/lib/core/constants.lua @@ -1,33 +0,0 @@ -ROSHAMUUL_MORTAR_THROWN = 20200 -ROSHAMUUL_KILLED_FRAZZLEMAWS = 20201 -ROSHAMUUL_KILLED_SILENCERS = 20202 -ROSHAMUUL_GOLD_RECORD = 20203 - -SPIKE_FAME_POINTS = 27890 - -SPIKE_UPPER_PACIFIER_MAIN = 27891 -SPIKE_UPPER_PACIFIER_DAILY = 27892 -SPIKE_UPPER_MOUND_MAIN = 27893 -SPIKE_UPPER_MOUND_DAILY = 27894 -SPIKE_UPPER_TRACK_MAIN = 27895 -SPIKE_UPPER_TRACK_DAILY = 27896 -SPIKE_UPPER_KILL_MAIN = 27897 -SPIKE_UPPER_KILL_DAILY = 27898 - -SPIKE_MIDDLE_CHARGE_MAIN = 27899 -SPIKE_MIDDLE_CHARGE_DAILY = 27900 -SPIKE_MIDDLE_MUSHROOM_MAIN = 27901 -SPIKE_MIDDLE_MUSHROOM_DAILY = 27902 -SPIKE_MIDDLE_NEST_MAIN = 27903 -SPIKE_MIDDLE_NEST_DAILY = 27904 -SPIKE_MIDDLE_KILL_MAIN = 27905 -SPIKE_MIDDLE_KILL_DAILY = 27906 - -SPIKE_LOWER_PARCEL_MAIN = 27907 -SPIKE_LOWER_PARCEL_DAILY = 27908 -SPIKE_LOWER_UNDERCOVER_MAIN = 27909 -SPIKE_LOWER_UNDERCOVER_DAILY = 27910 -SPIKE_LOWER_LAVA_MAIN = 27911 -SPIKE_LOWER_LAVA_DAILY = 27912 -SPIKE_LOWER_KILL_MAIN = 27913 -SPIKE_LOWER_KILL_DAILY = 27914 diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index 8623ba7072a..8d7d9ede37c 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -115,49 +115,49 @@ if not Quests then }, [3] = { name = "Spike Task", - startStorageId = Storage.SpikeTaskQuest.QuestLine, + startStorageId = Storage.Quest.U10_20.SpikeTaskQuest.QuestLine, startStorageValue = 1, missions = { [1] = { name = "First Task", - storageId = Storage.SpikeTaskQuest.Gnomilly, + storageId = Storage.Quest.U10_20.SpikeTaskQuest.Gnomilly, missionId = 1021, startValue = 0, endValue = 100, description = function(player) - return string.format("You have %d points of task. You need 100 points to take Cave Explorer outfit.", (math.max(player:getStorageValue(Storage.SpikeTaskQuest.Gnomilly), 0))) + return string.format("You have %d points of task. You need 100 points to take Cave Explorer outfit.", (math.max(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Gnomilly), 0))) end, }, [2] = { name = "Second Task", - storageId = Storage.SpikeTaskQuest.Gnombold.Points, + storageId = Storage.Quest.U10_20.SpikeTaskQuest.Gnombold.Points, missionId = 1022, startValue = 0, endValue = 100, description = function(player) - return string.format("You have %d points of task. You need 100 points to take first addon.", (math.max(player:getStorageValue(Storage.SpikeTaskQuest.Gnombold.Points), 0))) + return string.format("You have %d points of task. You need 100 points to take first addon.", (math.max(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Gnombold.Points), 0))) end, }, [3] = { name = "Third Task", - storageId = Storage.SpikeTaskQuest.Gnomargery.Points, + storageId = Storage.Quest.U10_20.SpikeTaskQuest.Gnomargery.Points, missionId = 1023, startValue = 0, endValue = 100, description = function(player) - return string.format("You have %d points of task. You need 100 points to take second addon.", (math.max(player:getStorageValue(Storage.SpikeTaskQuest.Gnomargery.Points), 0))) + return string.format("You have %d points of task. You need 100 points to take second addon.", (math.max(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Gnomargery.Points), 0))) end, }, }, }, [4] = { name = "A Father's Burden", - startStorageId = Storage.FathersBurden.QuestLog, + startStorageId = Storage.Quest.U8_6.AFathersBurden.QuestLog, startStorageValue = 1, missions = { [1] = { name = "The Birthday Presents", - storageId = Storage.FathersBurden.Status, + storageId = Storage.Quest.U8_6.AFathersBurden.Status, missionId = 1024, startValue = 1, endValue = 2, @@ -169,7 +169,7 @@ if not Quests then }, [2] = { name = "The Magic Bow - Sinew", - storageId = Storage.FathersBurden.Sinew, + storageId = Storage.Quest.U8_6.AFathersBurden.Sinew, missionId = 1025, startValue = 1, endValue = 2, @@ -180,7 +180,7 @@ if not Quests then }, [3] = { name = "The Magic Bow - Wood", - storageId = Storage.FathersBurden.Wood, + storageId = Storage.Quest.U8_6.AFathersBurden.Wood, missionId = 1026, startValue = 1, endValue = 2, @@ -192,7 +192,7 @@ if not Quests then }, [4] = { name = "The Magic Robe - Cloth", - storageId = Storage.FathersBurden.Cloth, + storageId = Storage.Quest.U8_6.AFathersBurden.Cloth, missionId = 1027, startValue = 1, endValue = 2, @@ -204,7 +204,7 @@ if not Quests then }, [5] = { name = "The Magic Robe - Silk", - storageId = Storage.FathersBurden.Silk, + storageId = Storage.Quest.U8_6.AFathersBurden.Silk, missionId = 1028, startValue = 1, endValue = 2, @@ -215,7 +215,7 @@ if not Quests then }, [6] = { name = "The Magic Rod - Crystal", - storageId = Storage.FathersBurden.Crystal, + storageId = Storage.Quest.U8_6.AFathersBurden.Crystal, missionId = 1029, startValue = 1, endValue = 2, @@ -226,7 +226,7 @@ if not Quests then }, [7] = { name = "The Magic Rod - Root", - storageId = Storage.FathersBurden.Root, + storageId = Storage.Quest.U8_6.AFathersBurden.Root, missionId = 1030, startValue = 1, endValue = 2, @@ -237,7 +237,7 @@ if not Quests then }, [8] = { name = "The Magic Shield - Iron", - storageId = Storage.FathersBurden.Iron, + storageId = Storage.Quest.U8_6.AFathersBurden.Iron, missionId = 1031, startValue = 1, endValue = 2, @@ -249,7 +249,7 @@ if not Quests then }, [9] = { name = "The Magic Shield - Scale", - storageId = Storage.FathersBurden.Scale, + storageId = Storage.Quest.U8_6.AFathersBurden.Scale, missionId = 1032, startValue = 1, endValue = 2, @@ -3111,7 +3111,7 @@ if not Quests then }, [3] = { name = "Pythius the Rotten", - storageId = Storage.QuestChests.FirewalkerBoots, + storageId = Storage.Quest.U8_4.TheHiddenCityOfBeregar.FirewalkerBoots, missionId = 10230, startValue = 1, endValue = 1, @@ -3488,12 +3488,12 @@ if not Quests then }, [24] = { name = "The Postman Missions", - startStorageId = Storage.Postman.Mission01, + startStorageId = Storage.Quest.U7_24.ThePostmanMissions.Mission01, startStorageValue = 1, missions = { [1] = { name = "Mission 01 - Check Postal Routes", - storageId = Storage.Postman.Mission01, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission01, missionId = 10252, startValue = 1, endValue = 6, @@ -3508,7 +3508,7 @@ if not Quests then }, [2] = { name = "Mission 02 - Fix Mailbox", - storageId = Storage.Postman.Mission02, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission02, missionId = 10253, startValue = 1, endValue = 3, @@ -3520,7 +3520,7 @@ if not Quests then }, [3] = { name = "Mission 03 - Bill Delivery", - storageId = Storage.Postman.Mission03, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission03, missionId = 10254, startValue = 1, endValue = 3, @@ -3533,7 +3533,7 @@ if not Quests then }, [4] = { name = "Mission 04 - Aggressive Dogs", - storageId = Storage.Postman.Mission04, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission04, missionId = 10255, startValue = 1, endValue = 2, @@ -3544,7 +3544,7 @@ if not Quests then }, [5] = { name = "Mission 05 - Present Delivery", - storageId = Storage.Postman.Mission05, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission05, missionId = 10256, startValue = 1, endValue = 4, @@ -3558,7 +3558,7 @@ if not Quests then }, [6] = { name = "Mission 06 - New Uniforms", - storageId = Storage.Postman.Mission06, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission06, missionId = 10257, startValue = 1, endValue = 13, @@ -3582,7 +3582,7 @@ if not Quests then }, [7] = { name = "Mission 07 - Measurements", - storageId = Storage.Postman.Mission07, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission07, missionId = 10258, startValue = 1, endValue = 9, @@ -3599,7 +3599,7 @@ if not Quests then }, [8] = { name = "Mission 08 - Missing Courier", - storageId = Storage.Postman.Mission08, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission08, missionId = 10259, startValue = 1, endValue = 3, @@ -3611,7 +3611,7 @@ if not Quests then }, [9] = { name = "Mission 09 - Dear Santa", - storageId = Storage.Postman.Mission09, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission09, missionId = 10260, startValue = 1, endValue = 4, @@ -3624,7 +3624,7 @@ if not Quests then }, [10] = { name = "Mission 10 - Mintwallin", - storageId = Storage.Postman.Mission10, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission10, missionId = 10261, startValue = 1, endValue = 3, @@ -3636,7 +3636,7 @@ if not Quests then }, [11] = { name = "Postman Rank", - storageId = Storage.Postman.Rank, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Rank, missionId = 10262, startValue = 1, endValue = 5, @@ -4382,12 +4382,12 @@ if not Quests then }, [30] = { name = "The White Raven Monastery", - startStorageId = Storage.WhiteRavenMonastery.QuestLog, + startStorageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, startStorageValue = 1, missions = { [1] = { name = "Access to the Isle of Kings", - storageId = Storage.WhiteRavenMonastery.Passage, + storageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, missionId = 10315, startValue = 1, endValue = 2, @@ -4398,7 +4398,7 @@ if not Quests then }, [2] = { name = "The Investigation", - storageId = Storage.WhiteRavenMonastery.Diary, + storageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, missionId = 10316, startValue = 1, endValue = 2, @@ -4412,12 +4412,12 @@ if not Quests then }, [31] = { name = "Tibia Tales", - startStorageId = Storage.TibiaTales.DefaultStart, + startStorageId = Storage.Quest.U8_1.TibiaTales.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "To Appease the Mighty", - storageId = Storage.TibiaTales.ToAppeaseTheMightyQuest, + storageId = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, missionId = 10317, startValue = 0, endValue = 4, @@ -4431,7 +4431,7 @@ if not Quests then }, [2] = { name = "Arito's Task", - storageId = Storage.TibiaTales.AritosTask, + storageId = Storage.Quest.U8_1.TibiaTales.AritosTask, missionId = 10318, startValue = 1, endValue = 3, @@ -4443,7 +4443,7 @@ if not Quests then }, [3] = { name = "Lion's Rock", - storageId = Storage.LionsRock.Questline, + storageId = Storage.Quest.U10_70.LionsRock.Questline, missionId = 10319, startValue = 1, endValue = 11, @@ -4451,25 +4451,25 @@ if not Quests then [1] = function(player) return string.format( "You have discovered the Lion's Rock. If you pass the following tests you may enter the inner sanctum.\n\nThe Lion's Strength %d/1\nThe Lion's Beauty %d/1\nThe Lion's Tears %d/1", - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsStrength), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsBeauty), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsTears), 0)) + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears), 0)) ) end, [2] = function(player) return string.format( "You have discovered the Lion's Rock. If you pass the following tests you may enter the inner sanctum.\n\nThe Lion's Strength %d/1\nThe Lion's Beauty %d/1\nThe Lion's Tears %d/1", - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsStrength), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsBeauty), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsTears), 0)) + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears), 0)) ) end, [3] = function(player) return string.format( "You have discovered the Lion's Rock. If you pass the following tests you may enter the inner sanctum.\n\nThe Lion's Strength %d/1\nThe Lion's Beauty %d/1\nThe Lion's Tears %d/1", - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsStrength), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsBeauty), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsTears), 0)) + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears), 0)) ) end, [4] = "You have passed the three tests of Lion's Rock and thus lit the three mystical pyramids. You may enter the inner sanctum now. - What other secrets could be hidden down there?", @@ -4477,28 +4477,28 @@ if not Quests then [6] = function(player) return string.format( "lions' enemies in this area of the temple. What could be the resolution?\n\nblood %d/1\negg %d/1\neye %d/1\npoison %d/1", - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.SnakeSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.LizardSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.ScorpionSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.HyenaSign), 0)) + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign), 0)) ) end, [7] = function(player) return string.format( "lions' enemies in this area of the temple. What could be the resolution?\n\nblood %d/1\negg %d/1\neye %d/1\npoison %d/1", - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.SnakeSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.LizardSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.ScorpionSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.HyenaSign), 0)) + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign), 0)) ) end, [8] = function(player) return string.format( "lions' enemies in this area of the temple. What could be the resolution?\n\nblood %d/1\negg %d/1\neye %d/1\npoison %d/1", - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.SnakeSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.LizardSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.ScorpionSign), 0)), - (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.HyenaSign), 0)) + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign), 0)), + (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign), 0)) ) end, [9] = 'In the north-west area of the Inner Sanctum, find the southern rectangular room to the south-west. In this room you will find 4 "sun" floor inscriptions as well as a rock in the center. The sun inscriptions represent gem slots.', @@ -4507,7 +4507,7 @@ if not Quests then }, [4] = { name = "Against the Spider Cult", - storageId = Storage.TibiaTales.AgainstTheSpiderCult, + storageId = Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, missionId = 10320, startValue = 1, endValue = 6, @@ -4522,7 +4522,7 @@ if not Quests then }, [5] = { name = "An Interest In Botany", - storageId = Storage.TibiaTales.AnInterestInBotany.Questline, + storageId = Storage.Quest.U8_6.AnInterestInBotany.Questline, missionId = 10321, startValue = 1, endValue = 4, @@ -4538,17 +4538,17 @@ if not Quests then }, [6] = { name = "Graves Sanctified - In Progress", - storageId = Storage.TibiaTales.RestInHallowedGround.HolyWater, + storageId = Storage.Quest.U8_1.RestInHallowedGround.HolyWater, missionId = 10322, startValue = 1, endValue = 15, description = function(player) - return string.format("You sanctified %d of 15 graves.", (math.max(player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater), 0))) + return string.format("You sanctified %d of 15 graves.", (math.max(player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater), 0))) end, }, [7] = { name = "Into the Bone Pit", - storageId = Storage.TibiaTales.IntoTheBonePit, + storageId = Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, missionId = 10323, startValue = 1, endValue = 3, @@ -4561,7 +4561,7 @@ if not Quests then }, [8] = { name = "Rest in Hallowed Ground", - storageId = Storage.TibiaTales.RestInHallowedGround.Questline, + storageId = Storage.Quest.U8_1.RestInHallowedGround.Questline, missionId = 10324, startValue = 1, endValue = 5, @@ -4576,7 +4576,7 @@ if not Quests then }, [9] = { name = "The Exterminator", - storageId = Storage.TibiaTales.TheExterminator, + storageId = Storage.Quest.U8_1.TibiaTales.TheExterminator, missionId = 10325, startValue = 1, endValue = 3, @@ -4590,7 +4590,7 @@ if not Quests then }, [10] = { name = "The Ultimate Booze", - storageId = Storage.TibiaTales.UltimateBoozeQuest, + storageId = Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, missionId = 10326, startValue = 1, endValue = 3, @@ -4603,7 +4603,7 @@ if not Quests then }, [11] = { name = "Jack to the Future", - storageId = Storage.TibiaTales.JackFutureQuest.QuestLine, + storageId = Storage.Quest.U8_7.JackFutureQuest.QuestLine, missionId = 10327, startValue = 1, endValue = 11, @@ -4636,7 +4636,7 @@ if not Quests then }, [12] = { name = "The Cursed Crystal", - storageId = Storage.TibiaTales.TheCursedCrystal.Questline, + storageId = Storage.Quest.U10_70.TheCursedCrystal.Questline, missionId = 10328, startValue = 0, endValue = 4, @@ -4675,7 +4675,7 @@ if not Quests then }, [14] = { name = "To Outfox a Fox", - storageId = Storage.TibiaTales.ToOutfoxAFoxQuest, + storageId = Storage.Quest.U8_1.ToOutfoxAFoxQuest, missionId = 10432, startValue = 1, endValue = 2, @@ -5153,12 +5153,12 @@ if not Quests then }, [35] = { name = "Oramond", - startStorageId = Storage.Oramond.QuestLine, + startStorageId = Storage.Quest.U10_50.OramondQuest.QuestLine, startStorageValue = 1, missions = { [1] = { name = "To Take Roots", - storageId = Storage.Oramond.MissionToTakeRoots, + storageId = Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, missionId = 10360, startValue = 1, endValue = 3000, @@ -5597,43 +5597,25 @@ if not Quests then }, }, }, - [40] = { -- FREE SLOT FOR A SIMPLE QUEST - name = "XXXXXXXXXXXX", - startStorageId = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, - startStorageValue = 1, - missions = { - [1] = { - name = "XXXXXXXXXXXX", - storageId = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, - missionId = 10387, - startValue = 1, - endValue = 2, - states = { - [1] = "XXXXXXXXXXXX", - [2] = "XXXXXXXXXXXX", - }, - }, - }, - }, - [41] = { + [40] = { name = "Adventurers Guild", - startStorageId = Storage.AdventurersGuild.QuestLine, + startStorageId = Storage.Quest.U9_80.AdventurersGuild.QuestLine, startStorageValue = 1, missions = { [1] = { name = "The Great Dragon Hunt", - storageId = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, + storageId = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, missionId = 10388, startValue = 0, endValue = 2, description = function(player) return ("You are exploring the Kha'zeel Dragon Lairs. Others obviously found a terrible end here. \z - But the dragon hoards might justify the risks. You killed %d/50 dragons and dragon lords."):format(math.max(player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter), 0)) + But the dragon hoards might justify the risks. You killed %d/50 dragons and dragon lords."):format(math.max(player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter), 0)) end, }, [2] = { name = "The Lost Brother", - storageId = Storage.AdventurersGuild.TheLostBrother, + storageId = Storage.Quest.U10_80.TheLostBrotherQuest, missionId = 11000, startValue = 1, endValue = 3, @@ -5645,7 +5627,7 @@ if not Quests then }, }, }, - [42] = { + [41] = { name = "Dawnport", startStorageId = Storage.Quest.U10_55.Dawnport.Questline, startStorageValue = 1, @@ -5740,7 +5722,7 @@ if not Quests then }, }, }, - [43] = { + [42] = { name = "The Rookie Guard", startStorageId = Storage.Quest.U9_1.TheRookieGuard.Questline, startStorageValue = 1, @@ -5922,7 +5904,7 @@ if not Quests then }, }, }, - [44] = { + [43] = { name = "The New Frontier", startStorageId = Storage.Quest.U8_54.TheNewFrontier.Questline, startStorageValue = 1, @@ -6171,7 +6153,7 @@ if not Quests then }, }, }, - [45] = { + [44] = { name = "Spirithunters Quest", startStorageId = Storage.Quest.U8_7.SpiritHunters.Mission01, startStorageValue = 1, @@ -6211,7 +6193,7 @@ if not Quests then }, }, }, - [46] = { + [45] = { name = "Threatened Dreams", startStorageId = Storage.Quest.U11_40.ThreatenedDreams.QuestLine, startStorageValue = 1, @@ -6306,7 +6288,7 @@ if not Quests then }, }, }, - [47] = { + [46] = { name = "Blood Brothers", startStorageId = Storage.Quest.U8_4.BloodBrothers.QuestLine, startStorageValue = 1, @@ -6359,7 +6341,7 @@ if not Quests then }, }, }, - [48] = { + [47] = { name = "Grave Danger", startStorageId = Storage.Quest.U12_20.GraveDanger.QuestLine, startStorageValue = 1, @@ -6536,14 +6518,14 @@ if not Quests then }, }, }, - [49] = { + [48] = { name = "The Outlaw Camp", - startStorageId = Storage.QuestChests.OutlawCamp, + startStorageId = Storage.Quest.U6_4.OutlawCampQuest, startStorageValue = 1, missions = { [1] = { name = "Outlaw Treasure", - storageId = Storage.QuestChests.OutlawCamp, + storageId = Storage.Quest.U6_4.OutlawCampQuest, missionId = 10451, startValue = 1, endValue = 1, diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index cfbda04a03b..1c4033b09bc 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -414,11 +414,6 @@ Storage = { RewardMask = 50370, RewardBackpack = 50371, }, - Grimvale = { - -- Reserved storage from 50380 - 50399 - SilverVein = 50380, - WereHelmetEnchant = 50381, - }, HeroRathleton = { -- Reserved storage from 50400 - 50419 QuestLine = 50400, @@ -429,42 +424,6 @@ Storage = { AccessTeleport2 = 50405, AccessTeleport3 = 50406, }, - FerumbrasAscension = { - -- Reserved storage from 50420 - 50469 - RiftRunner = 50420, -- Scroll - TheShattererTimer = 50421, - TheLordOfTheLiceTimer = 50422, - Tarbaz = 50431, - Razzagorn = 50432, - Ragiaz = 50433, - Zamulosh = 50434, - Shulgrax = 50435, - Mazoran = 50436, - Plagirath = 50437, - Access = 50438, - TheShatterer = 50439, - ZamuloshTeleports = 50440, - BasinCounter = 50441, - TheLordOfTheLiceAccess = 50442, - FirstDoor = 50443, - MonsterDoor = 50444, - TarbazDoor = 50445, - HabitatsAccess = 50446, - HabitatsTimer = 50447, - TarbazNotes = 50448, - ColorLever = 50449, - BoneFluteWall = 50450, - BoneFlute = 50451, - Ring = 50452, - Statue = 50453, - Fount = 50454, - Vampire = 50455, - Flower = 50456, - Ring2 = 50457, - Bone = 50458, - Reward = 50459, - TheShattererLever = 50460, - }, ForgottenKnowledge = { -- Reserved storage from 50470 - 50519 AccessDeath = 50470, @@ -505,145 +464,6 @@ Storage = { AmuletTimer = 50520, AmuletStatus = 50521, }, - GravediggerOfDrefia = { - -- Reserved storage from 50760 - 50849 - QuestStart = 50760, - Mission01 = 50761, - Mission02 = 50762, - Mission03 = 50763, - Mission04 = 50764, - Mission05 = 50765, - Mission06 = 50766, - Mission07 = 50767, - Mission08 = 50768, - Mission09 = 50769, - Mission10 = 50770, - Mission11 = 50771, - Mission12 = 50772, - Mission13 = 50773, - Mission14 = 50774, - Mission15 = 50775, - Mission16 = 50776, - Mission17 = 50777, - Mission18 = 50778, - Mission19 = 50779, - Mission20 = 50780, - Mission21 = 50781, - Mission22 = 50782, - Mission23 = 50783, - Mission24 = 50784, - Mission25 = 50785, - Mission26 = 50786, - Mission27 = 50787, - Mission28 = 50788, - Mission29 = 50789, - Mission30 = 50790, - Mission31 = 50791, - Mission32 = 50792, - Mission32a = 50793, - Mission32b = 50794, - Mission33 = 50795, - Mission34 = 50796, - Mission35 = 50797, - Mission36 = 50798, - Mission36a = 50799, - Mission37 = 50800, - Mission38 = 50801, - Mission38a = 50802, - Mission38b = 50803, - Mission38c = 50804, - Mission39 = 50805, - Mission40 = 50806, - Mission41 = 50807, - Mission42 = 50808, - Mission43 = 50809, - Mission44 = 50810, - Mission45 = 50811, - Mission46 = 50812, - Mission47 = 50813, - Mission48 = 50814, - Mission49 = 50815, - Mission50 = 50816, - Mission51 = 50817, - Mission52 = 50818, - Mission53 = 50819, - Mission54 = 50820, - Mission55 = 50821, - Mission56 = 50822, - Mission57 = 50823, - Mission58 = 50824, - Mission59 = 50825, - Mission60 = 50826, - Mission61 = 50827, - Mission62 = 50828, - Mission63 = 50829, - Mission64 = 50830, - Mission65 = 50831, - Mission66 = 50832, - Mission67 = 50833, - Mission68 = 50834, - Mission69 = 50835, - Mission70 = 50836, - Mission71 = 50837, - Mission72 = 50838, - Mission73 = 50839, - Mission74 = 50840, - Bookcase = 50841, - }, - Oramond = { - -- Reserved storage from 50850 - 50879 - QuestLine = 50850, - VotingPoints = 50851, - MissionToTakeRoots = 50852, - HarvestedRootCount = 50853, - TaskProbing = 50854, - DoorBeggarKing = 50855, - MissionAbandonedSewer = 50856, - DoorAbandonedSewer = 50857, - }, - DarkTrails = { - -- Reserved storage from 50880 - 50909 - Mission01 = 50881, - Mission02 = 50882, - Mission03 = 50883, - Mission04 = 50884, - Mission05 = 50885, - Mission06 = 50886, - Mission07 = 50887, - Mission08 = 50888, - Mission09 = 50889, - Mission10 = 50890, - Mission11 = 50891, - Mission12 = 50892, - Mission13 = 50893, - Mission14 = 50894, - Mission15 = 50895, - Mission16 = 50896, - Mission17 = 50897, - Mission18 = 50898, - Outfit = 50899, -- final storage - DoorQuandon = 50901, - DoorHideout = 50902, - }, - SpikeTaskQuest = { - -- Reserved storage from 50910 - 50959 - QuestLine = 50910, - Gnomilly = 50911, - Gnombold = { - Points = 50912, - Nests = 50913, - Fertilise = 50914, - Kill = 50915, - Charges = 50916, - }, - Gnomargery = { - Points = 50920, - Deliver = 50921, - Undercover = 50922, - Temperature = 50923, - Kill = 50924, - }, - }, OutfitQuest = { -- Reserved storage from 50960 - 51039 -- Until all outfit quests are completed @@ -651,142 +471,15 @@ Storage = { Ref = 50961, -- Golden Outfit GoldenOutfit = 51015, - DeeplingAnchor = 51023, RoyalCostumeOutfit = 51026, }, - Postman = { - -- Reserved storage from 51360 - 51389 - Mission01 = 51360, - Mission02 = 51361, - Mission03 = 51362, - Mission04 = 51363, - Mission05 = 51364, - Mission06 = 51365, - Mission07 = 51366, - Mission08 = 51367, - Mission09 = 51368, - Mission10 = 51369, - Rank = 51370, - Door = 51371, - TravelCarlin = 51372, - TravelEdron = 51373, - TravelVenore = 51374, - TravelCormaya = 51375, - MeasurementsBenjamin = 51376, - MeasurementsKroox = 51377, - MeasurementsDove = 51378, - MeasurementsLiane = 51379, - MeasurementsChrystal = 51380, - MeasurementsOlrik = 51381, - }, TheHuntForTheSeaSerpent = { -- Reserved storage from 51410 - 51419 }, - TibiaTales = { - -- Reserved storage from 51480 - 51539 - DefaultStart = 51480, - UltimateBoozeQuest = 51481, - AgainstTheSpiderCult = 51482, - AnInterestInBotany = { - Questline = 51483, - ChestDoor = 51484, - BotanyAlmanach = 51485, - }, - AritosTask = 51486, - ToAppeaseTheMightyQuest = 51487, - IntoTheBonePit = 51488, - TheExterminator = 51489, - AritosTaskDoor = 51490, - RestInHallowedGround = { - Questline = 51491, - HolyWater = 51492, - Graves = { - 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 = 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, - }, - 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 - }, BanutaSecretTunnel = { -- Reserved storage from 51680 - 51689 DeeperBanutaShortcut = 51680, }, - QuestChests = { - -- Reserved storage from 51730 - 51999 - - TutorialShovel = 51732, - TutorialRope = 51733, - FormorgarMinesHoistSkeleton = 51737, - FormorgarMinesHoistChest = 51738, - -- Custom Quests, currently not using system.lua (aid 2000) - BlackKnightTreeCrownShield = 51739, - BlackKnightTreeCrownArmor = 51740, - BlackKnightTreeKey = 51741, - SilverBrooch = 51744, - FamilyBrooch = 51745, - DCQGhoul = 51746, - FirewalkerBoots = 51747, - DeeperFibulaKey = 51748, - ParchmentRoomQuest = 51750, - WarzoneReward1 = 51751, - WarzoneReward2 = 51752, - WarzoneReward3 = 51753, - FathersBurdenWood = 51754, - FathersBurdenIron = 51755, - FathersBurdenRoot = 5176, - FathersBurdenCrystal = 51757, - FathersBurdenSilk = 51758, - FathersBurdenCloth = 51759, - WhisperMoss = 51766, - OldParchment = 51767, - DragahsSpellbook = 51768, - StealFromThieves = 51769, - OutlawCamp = 51770, -- quest log to The Outlaw Camp - WitchHouseQuest = 51771, - SimonTheBeggarsFavoriteStaff = 51772, - }, HorestisTomb = { -- Reserved storage from 52020 - 52029 JarFloor1 = 52020, @@ -795,31 +488,6 @@ Storage = { JarFloor4 = 52023, JarFloor5 = 52024, }, - WhiteRavenMonastery = { - -- Reserved storage from 52030 - 52039 - QuestLog = 52030, - Passage = 52031, - Diary = 52032, - Door = 52033, - }, - FathersBurden = { - -- Reserved storage from 52040 - 52059 - QuestLog = 52040, - Progress = 52041, - Status = 52042, - Sinew = 52043, - Wood = 52044, - Cloth = 52045, - Silk = 52046, - Crystal = 52047, - Root = 52048, - Iron = 52049, - Scale = 52050, - Corpse = { - Scale = 52051, - Sinew = 52052, - }, - }, Diapason = { -- Reserved storage from 52120 - 52129 Lyre = 52120, @@ -827,33 +495,6 @@ Storage = { Edala = 52122, EdalaTimer = 52123, }, - AdventurersGuild = { - -- Reserved storage from 52130 - 52159 - Stone = 52130, - MagicDoor = 52131, - CharosTrav = 52132, - FreeStone = { - Alia = 52133, - Amanda = 52134, - Brewster = 52135, - Isimov = 52136, - Kasmir = 52137, - Kjesse = 52138, - Lorietta = 52139, - Maealil = 52140, - Quentin = 52141, - RockWithASoftSpot = 52142, - Tyrias = 52143, - Yberius = 52144, - Rahkem = 52145, - }, - GreatDragonHunt = { - WarriorSkeleton = 52146, - DragonCounter = 52147, - }, - QuestLine = 52148, - TheLostBrother = 52149, - }, HallsOfHope = { -- Reserved storage from 52200 - 52219 Questline = 52200, @@ -916,24 +557,6 @@ Storage = { Lever = 52278, Mainland = 52279, }, - LionsRock = { - -- Reserved storage from 52290 - 52309 - Questline = 52290, - OuterSanctum = { - Skeleton = 52291, - LionsStrength = 52292, - LionsBeauty = 52293, - LionsTears = 52294, - }, - InnerSanctum = { - SnakeSign = 52295, - LizardSign = 52296, - ScorpionSign = 52297, - HyenaSign = 52298, - Message = 52299, - }, - Time = 52300, - }, GraveDanger = { -- Reserved storage from 52310 - 52339 Questline = 52310, @@ -1000,7 +623,10 @@ Storage = { }, -- Start of quests per version -- Use the reserved storage keys accordingly - KeysUpdate = 40000, + KeysUpdate = 39999, + U5_0 = { -- update 5.0 - Reserved Storages 40000 + DeeperFibulaKey = 40000, + }, PreU6_0 = { -- update pre-6.0 - Reserved Storages 40001 - 40020 OrnamentedShield = { Rewards = { @@ -1048,6 +674,7 @@ Storage = { DemonShield = 40078, }, }, + OutlawCampQuest = 40079, }, U7_1 = { -- update 7.1 - Reserved Storages 40121 - 40140 DragonTower = { @@ -1121,8 +748,36 @@ Storage = { Wand = 10111, }, }, - ThePostmanMissions = {}, - TheWhiteRavenMonastery = {}, + ThePostmanMissions = { + Mission01 = 10112, + Mission02 = 10113, + Mission03 = 10114, + Mission04 = 10115, + Mission05 = 10116, + Mission06 = 10117, + Mission07 = 10118, + Mission08 = 10119, + Mission09 = 10120, + Mission10 = 10121, + Rank = 10122, + Door = 10123, + TravelCarlin = 10124, + TravelEdron = 10125, + TravelVenore = 10126, + TravelCormaya = 10127, + MeasurementsBenjamin = 10128, + MeasurementsKroox = 10129, + MeasurementsDove = 10130, + MeasurementsLiane = 10131, + MeasurementsChrystal = 10132, + MeasurementsOlrik = 10133, + }, + TheWhiteRavenMonastery = { + QuestLog = 10134, + Passage = 10135, + Diary = 10136, + Door = 10137, + }, VoodooDoll = {}, }, U7_3 = { -- update 7.3 - Reserved Storages 40351 - 40400 @@ -1266,6 +921,8 @@ Storage = { Hengis = 40666, }, }, + OldParchment = 40667, + WhisperMoss = 40668, }, U7_8 = { -- update 7.8 - Reserved Storages 40761 - 41000 AssassinOutfits = { @@ -1519,6 +1176,8 @@ Storage = { NorsemanOutfit = 41306, NoblemanFirstAddon = 41307, NoblemanSecondAddon = 41308, + FormorgarMinesHoistSkeleton = 41309, + FormorgarMinesHoistChest = 41310, }, }, U8_1 = { -- update 8.1 - Reserved Storages 41351 - 41650 @@ -1533,99 +1192,142 @@ Storage = { KosheiAmuletPart3 = 41357, KosheiAmuletPart4 = 41358, }, + RestInHallowedGround = { + Questline = 41400, + HolyWater = 41401, + Graves = { + Grave1 = 41402, + Grave2 = 41403, + Grave3 = 41404, + Grave4 = 41405, + Grave5 = 41406, + Grave6 = 41407, + Grave7 = 41408, + Grave8 = 41409, + Grave9 = 41410, + Grave10 = 41411, + Grave11 = 41412, + Grave12 = 41413, + Grave13 = 41414, + Grave14 = 41415, + Grave15 = 41416, + Grave16 = 41417, + }, + }, 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, + Quest = 41440, + TBIMission01 = 41441, + AVINMission01 = 41442, + CGBMission01 = 41443, + TBIMission02 = 41444, + AVINMission02 = 41445, + CGBMission02 = 41446, + TBIMission03 = 41447, + AVINMission03 = 41448, + CGBMission03 = 41449, + TBIMission04 = 41450, + AVINMission04 = 41451, + CGBMission04 = 41452, + TBIMission05 = 41453, + AVINMission05 = 41454, + CGBMission05 = 41455, + TBIMission06 = 41456, + AVINMission06 = 41457, + CGBMission06 = 41458, + Mission07 = 41459, + RottenTree = 41460, + AHX17L89 = 41461, + FamilySignetRing = 41462, + MagicSpellbook = 41463, + BuildingPlans = 41464, + SuspiciousDocuments = 41465, + Book = 41466, + RottenHeartOfTree = 41467, + LotteryTicket = 41468, + PoemScroll = 41469, + IntelligenceReports = 41470, }, StrongPotions = { - Reward = 41390, + Reward = 41471, + }, + TibiaTales = { + DefaultStart = 41472, + UltimateBoozeQuest = 41473, + AgainstTheSpiderCult = 41474, + AritosTask = 41475, + ToAppeaseTheMightyQuest = 41476, + IntoTheBonePit = 41477, + TheExterminator = 41478, + AritosTaskDoor = 41479, }, TheTravellingTrader = { - Mission01 = 41391, - Mission02 = 41392, - Mission03 = 41393, - Mission04 = 41394, - Mission05 = 41395, - Mission06 = 41396, - Mission07 = 41397, + Mission01 = 41480, + Mission02 = 41481, + Mission03 = 41482, + Mission04 = 41483, + Mission05 = 41484, + Mission06 = 41485, + Mission07 = 41486, + }, + ToBlindTheEnemy = { + Questline = 41487, + DwarvenShield = 41488, + MorningStar = 41489, + BP1 = 41490, + BP2 = 41491, + }, + ToOutfoxAFoxQuest = { + Questline = 41492, + MiningHelmet = 41493, }, TowerDefenceQuest = { - Questline = 41398, - Door = 41399, + Questline = 41494, + Door = 41495, }, - WaterfallQuest = 41400, + WaterfallQuest = 41496, 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, + Questline = 41500, + Mission1 = 41501, + Mission2 = 41502, + Mission3 = 41503, + Mission4 = 41504, + Mission5 = 41505, + Mission6 = 41506, + Mission7 = 41507, + Mission8 = 41508, + Mission9 = 41509, + Mission10 = 41510, + Mission11 = 41511, + PieBuying = 41512, + PieBoxTimer = 41513, + TriangleTowerDoor = 41514, + EmperorBeardShave = 41515, + JesterOutfit = 41516, + WhoopeeCushion = 41517, + QueenEloiseCatDoor = 41518, + CatBasket = 41519, + ScaredCarina = 41520, + InflammableSulphur = 41521, + SpecialLeaves = 41522, + Cigar = 41523, + Contract = 41524, CookieDelivery = { - SimonTheBeggar = 41426, - Markwin = 41427, - Ariella = 41428, - Hairycles = 41429, - Djinn = 41430, - AvarTar = 41431, - OrcKing = 41432, - Lorbas = 41433, - Wyda = 41434, - Hjaern = 41435, + SimonTheBeggar = 41525, + Markwin = 41526, + Ariella = 41527, + Hairycles = 41528, + Djinn = 41529, + AvarTar = 41530, + OrcKing = 41531, + Lorbas = 41532, + Wyda = 41533, + Hjaern = 41534, }, - OldWornCloth = 41436, - LostDisguise = 41437, - ScaredKazzan = 41438, - MagicalWatch = 41439, - BagBookKnife = 41440, + OldWornCloth = 41535, + LostDisguise = 41536, + ScaredKazzan = 41537, + MagicalWatch = 41538, + BagBookKnife = 41539, }, }, U8_2 = { -- update 8.2 - Reserved Storages 41651 - 41900 @@ -1710,18 +1412,19 @@ Storage = { GoldenGoblet = 41724, CompromisingLetter = 41725, RewardEnd = 41726, + StealFromThieves = 41727, }, TrollSabotageQuest = { - Questline = 41727, - JumpTimer = 41728, + Questline = 41728, + JumpTimer = 41729, }, VampireHunterQuest = { - Rank = 41729, - Door = 41730, - BloodSkull = 41731, + Rank = 41730, + Door = 41731, + BloodSkull = 41732, }, TheMutatedPumpkin = { - Skinned = 41732, + Skinned = 41733, }, }, U8_4 = { -- update 8.4 - Reserved Storages 41901 - 42145 @@ -2150,7 +1853,28 @@ Storage = { }, -- 42781 - 42830 }, U8_6 = { -- update 8.6 - Reserved Storages 42951 - 43200 - AFathersBurden = {}, + AFathersBurden = { + QuestLog = 42951, + Progress = 42952, + Status = 42953, + Sinew = 42954, + Wood = 42955, + Cloth = 42956, + Silk = 42957, + Crystal = 42958, + Root = 42959, + Iron = 42960, + Scale = 42961, + Corpse = { + Scale = 42962, + Sinew = 42963, + }, + }, + AnInterestInBotany = { + Questline = 42964, + ChestDoor = 42965, + BotanyAlmanach = 42966, + }, TheSpiritWillGetYou = {}, WayfarerOutfits = {}, WrathOfTheEmperor = { @@ -2213,24 +1937,36 @@ Storage = { AnnualAutumnVintage = {}, Bewitched = {}, DemonsLullaby = {}, + JackFutureQuest = { + QuestLine = 43300, + Furniture01 = 43301, + Furniture02 = 43302, + Furniture03 = 43303, + Furniture04 = 43304, + Furniture05 = 43305, + Mother = 43306, + Sister = 43307, + Statue = 43308, + LastMissionState = 43309, + }, LastCreepStanding = {}, ResearchAndDevelopment = {}, RottinWoodAndTheMarriedMen = { - Questline = 43231, - RottinStart = 43232, - Trap = 43233, - Corpse = 43234, - Time = 43235, - Mission03 = 43236, - FirstTime = 43237, + Questline = 43310, + RottinStart = 43311, + Trap = 43312, + Corpse = 43313, + Time = 43314, + Mission03 = 43315, + FirstTime = 43316, }, SpiritHunters = { - Mission01 = 43238, - TombUse = 43239, - CharmUse = 43240, - NightstalkerUse = 43241, - SouleaterUse = 43242, - GhostUse = 43243, + Mission01 = 43317, + TombUse = 43318, + CharmUse = 43319, + NightstalkerUse = 43320, + SouleaterUse = 43321, + GhostUse = 43322, }, TheColoursOfMagic = {}, }, @@ -2383,6 +2119,27 @@ Storage = { WarpathMiniWorldChange = {}, }, U9_80 = { -- update 9.80 - Reserved Storages 44001 - 44100 + AdventurersGuild = { + Stone = 52130, + MagicDoor = 52131, + CharosTrav = 52132, + FreeStone = { + Alia = 52133, + Amanda = 52134, + Brewster = 52135, + Isimov = 52136, + Kasmir = 52137, + Kjesse = 52138, + Lorietta = 52139, + Maealil = 52140, + Quentin = 52141, + RockWithASoftSpot = 52142, + Tyrias = 52143, + Yberius = 52144, + Rahkem = 52145, + }, + QuestLine = 52148, + }, ChildOfDestiny = {}, GoblinMerchant = {}, VenoreDailyTasks = {}, @@ -2392,52 +2149,265 @@ Storage = { HuntingForTokens = {}, OpticordingSphere = {}, SmallSapphire = {}, - TheGravediggerOfDrefia = {}, + TheGravediggerOfDrefia = { + QuestStart = 44200, + Mission01 = 44201, + Mission02 = 44203, + Mission03 = 44204, + Mission04 = 44205, + Mission05 = 44206, + Mission06 = 44207, + Mission07 = 44208, + Mission08 = 44209, + Mission09 = 44210, + Mission10 = 44211, + Mission11 = 44212, + Mission12 = 44213, + Mission13 = 44214, + Mission14 = 44215, + Mission15 = 44216, + Mission16 = 44217, + Mission17 = 44218, + Mission18 = 44219, + Mission19 = 44220, + Mission20 = 44221, + Mission21 = 44222, + Mission22 = 44223, + Mission23 = 44224, + Mission24 = 44225, + Mission25 = 44226, + Mission26 = 44227, + Mission27 = 44228, + Mission28 = 44229, + Mission29 = 44230, + Mission30 = 44231, + Mission31 = 44232, + Mission32 = 44233, + Mission32a = 44234, + Mission32b = 44235, + Mission33 = 44236, + Mission34 = 44237, + Mission35 = 44238, + Mission36 = 44239, + Mission36a = 44240, + Mission37 = 44241, + Mission38 = 44242, + Mission38a = 44243, + Mission38b = 44244, + Mission38c = 44245, + Mission39 = 44246, + Mission40 = 44247, + Mission41 = 44248, + Mission42 = 44249, + Mission43 = 44250, + Mission44 = 44251, + Mission45 = 44252, + Mission46 = 44253, + Mission47 = 44254, + Mission48 = 44255, + Mission49 = 44256, + Mission50 = 44257, + Mission51 = 44258, + Mission52 = 44259, + Mission53 = 44260, + Mission54 = 44261, + Mission55 = 44262, + Mission56 = 44263, + Mission57 = 44264, + Mission58 = 44265, + Mission59 = 44266, + Mission60 = 44267, + Mission61 = 44268, + Mission62 = 44269, + Mission63 = 44270, + Mission64 = 44271, + Mission65 = 44272, + Mission66 = 44273, + Mission67 = 44274, + Mission68 = 44275, + Mission69 = 44276, + Mission70 = 44277, + Mission71 = 44278, + Mission72 = 44279, + Mission73 = 44280, + Mission74 = 44281, + Mission75 = 44282, + Mission76 = 44283, + Bookcase = 44285, + SmallDragonTears1 = 44286, + SmallDragonTears2 = 44287, + SmallDragonTears3 = 44288, + }, TheRepenters = {}, }, U10_20 = { -- update 10.20 - Reserved Storages 44301 - 44400 - CaveExplorerOutfits = {}, - SpikeTasks = {}, + SpikeTaskQuest = { + QuestLine = 44301, + Gnomilly = 44302, + Gnombold = { + Points = 44303, + Nests = 44304, + Fertilise = 44305, + Kill = 44306, + Charges = 44307, + }, + Gnomargery = { + Points = 44308, + Deliver = 44309, + Undercover = 44310, + Temperature = 44311, + Kill = 44312, + }, + Spike_Fame_Points = 44313, + Spike_Upper_Pacifier_Main = 44314, + Spike_Upper_Pacifier_Daily = 44315, + Spike_Upper_Mound_Main = 44316, + Spike_Upper_Mound_Daily = 44317, + Spike_Upper_Track_Main = 44318, + Spike_Upper_Track_Daily = 44319, + Spike_Upper_Kill_Main = 44320, + Spike_Upper_Kill_Daily = 44321, + Spike_Middle_Charge_Main = 44322, + Spike_Middle_Charge_Daily = 44323, + Spike_Middle_Mushroom_Main = 44324, + Spike_Middle_Mushroom_Daily = 44325, + Spike_Middle_Nest_Main = 44326, + Spike_Middle_Nest_Daily = 44327, + Spike_Middle_Kill_Main = 44328, + Spike_Middle_Kill_Daily = 44329, + Spike_Lower_Parcel_Main = 44330, + Spike_Lower_Parcel_Daily = 44331, + Spike_Lower_Undercover_Main = 44332, + Spike_Lower_Undercover_Daily = 44333, + Spike_Lower_Lava_Main = 44334, + Spike_Lower_Lava_Daily = 44335, + Spike_Lower_Kill_Main = 44336, + Spike_Lower_Kill_Daily = 44337, + }, SpiritGroundsMiniWorldChange = {}, }, U10_30 = { -- update 10.30 - Reserved Storages 44401 - 44500 DreamWardenOutfits = {}, - Roshamuul = {}, + RoshamuulQuest = { + Roshamuul_Mortar_Thrown = 44401, + Roshamuul_Killed_Frazzlemaws = 44402, + Roshamuul_Killed_Silencers = 44403, + Roshamuul_Gold_Record = 44404, + }, }, U10_37 = { -- update 10.37 - Reserved Storages 44501 - 44550 - TinderBox = {}, + TinderBoxQuestChyllfroest = { + Reward = 44501, + Obedience = 44502, + }, ChyllfroestMiniWorldChange = {}, }, U10_50 = { -- update 10.50 - Reserved Storages 44551 - 44750 - DarkTrails = {}, - GloothEngineerOutfits = {}, - Oramond = {}, + DarkTrails = { + Mission01 = 44551, + Mission02 = 44552, + Mission03 = 44553, + Mission04 = 44554, + Mission05 = 44555, + Mission06 = 44556, + Mission07 = 44557, + Mission08 = 44558, + Mission09 = 44559, + Mission10 = 44560, + Mission11 = 44561, + Mission12 = 44562, + Mission13 = 44563, + Mission14 = 44564, + Mission15 = 44565, + Mission16 = 44567, + Mission17 = 44568, + Mission18 = 44569, + Outfit = 44570, + DoorQuandon = 44571, + DoorHideout = 44572, + RewardSmallNotebook = 44573, + Reward05GlothAndBelongings = 44574, + Reward10GlothAndBelongings = 44575, + OramondTaskProbing = 44576, + }, + GloothEngineerOutfits = { + Addon1 = 44577, + Addon2 = 44578, + }, + OramondQuest = { + QuestLine = 44579, + VotingPoints = 44580, + ToTakeRoots = { + Mission = 44581, + Count = 44582, + Door = 44583, + }, + Probing = { + Mission = 44584, + MonoDetector = 44585, + }, + TheAncientSewers = { + Mission = 44586, + Door = 44587, + }, + ThePowderOfTheStars = { + Mission = 44588, + }, + }, Rathleton = {}, }, U10_55 = { -- update 10.55 - Reserved Storages 44751 - 44800 Dawnport = { - VocationReward = 20000, - Questline = 20001, - GoMain = 20002, - TheLostAmulet = 20003, - TheStolenLogBook = 20004, - TheRareHerb = 20005, - TheDormKey = 20006, - StrangeAmulet = 20007, - TornLogBook = 20008, - HerbFlower = 20009, - MorriskTroll = 20010, - MorrisTrollCount = 20011, - MorrisGoblin = 20012, - MorrisGoblinCount = 20013, - MorrisMinos = 20014, - MorrisMinosCount = 20015, + VocationReward = 44751, + Questline = 44752, + GoMain = 44753, + TheLostAmulet = 44754, + TheStolenLogBook = 44755, + TheRareHerb = 44756, + TheDormKey = 44757, + StrangeAmulet = 44758, + TornLogBook = 44759, + HerbFlower = 44760, + MorriskTroll = 44761, + MorrisTrollCount = 44762, + MorrisGoblin = 44763, + MorrisGoblinCount = 44764, + MorrisMinos = 44765, + MorrisMinosCount = 44766, + }, + SanctuaryOfTheLizardGod = { + LegionHelmet = 44767, + LizardGodTeleport = 44768, }, }, U10_70 = { -- update 10.70 - Reserved Storages 44801 - 44950 HeroOfRathleton = {}, - LionsRock = {}, - TheCursedCrystal = {}, + LionsRock = { + Questline = 44801, + OuterSanctum = { + Skeleton = 44802, + LionsStrength = 44803, + LionsBeauty = 44804, + LionsTears = 44805, + }, + InnerSanctum = { + SnakeSign = 44806, + LizardSign = 44807, + ScorpionSign = 44808, + HyenaSign = 44809, + Message = 44810, + }, + Time = 44811, + LionsRockFields = 44812, + }, + TheCursedCrystal = { + Questline = 44813, + Oneeyedjoe = 44814, + MedusaOil = 44815, + Time = 44816, + SheetOfPaper = 44817, + SmallCrystalBell = 44818, + }, TheFireFeatheredSerpentWorldChange = {}, TwentyMilesBeneathTheSea = {}, }, @@ -2446,22 +2416,107 @@ Storage = { Cartography101 = {}, ChakoyaIcebergMiniWorldChange = {}, GrimvaleMineWorldChange = {}, - Grimvale = { - AncientFeudDoors = 44956, - AncientFeudShortcut = 44957, + GrimvaleQuest = { + AncientFeudDoors = 45150, + AncientFeudShortcut = 45151, + SilverVein = 45152, + WereHelmetEnchant = 45153, }, HiveOutpostMiniWorldChange = {}, JungleCampMiniWorldChange = {}, NightmareIslesMiniWorldChange = {}, - NightmareTeddy = {}, PoacherCavesMiniWorldChange = {}, - TheGreatDragonHunt = {}, + TheGreatDragonHunt = { + WarriorSkeleton = 45180, + DragonCounter = 45181, + Achievement = 45182, + }, + TheLostBrotherQuest = 45183, TheTaintedSouls = {}, }, U10_90 = { -- update 10.90 - Reserved Storages 45201 - 45350 - FerumbrasAscension = {}, + FerumbrasAscension = { + RiftRunner = 45201, -- Scroll + TheShattererTimer = 45202, + TheLordOfTheLiceTimer = 45203, + Tarbaz = 45204, + Razzagorn = 45205, + Ragiaz = 45206, + Zamulosh = 45207, + Shulgrax = 45208, + Mazoran = 45209, + Plagirath = 45210, + Access = 45211, + TheShatterer = 45212, + ZamuloshTeleports = 45213, + BasinCounter = 45214, + TheLordOfTheLiceAccess = 45215, + FirstDoor = 45216, + MonsterDoor = 45217, + TarbazDoor = 45218, + HabitatsAccess = 45219, + HabitatsTimer = 45220, + TarbazNotes = 45221, + ColorLever = 45222, + BoneFluteWall = 45223, + BoneFlute = 45224, + Ring = 45225, + Statue = 45226, + Fount = 45227, + Vampire = 45228, + Flower = 45229, + Ring2 = 45230, + Bone = 45231, + Reward = 45232, + TheShattererLever = 45233, + TheLordOfTheLiceTime = 45234, + TarbazTime = 45235, + RagiazTime = 45236, + PlagirathTime = 45237, + RazzagornTime = 45238, + ZamuloshTime = 45239, + MazoranTime = 45240, + ShulgraxTime = 45241, + FerumbrasMortalShellTime = 45242, + ZamuloshSummon = 45243, + FerumbrasEssence = 45244, + DesperateSoul = 45245, + FlowerPuzzleTimer = 45246, + Crystals = { + Crystal1 = 45247, + Crystal2 = 45248, + Crystal3 = 45249, + Crystal4 = 45250, + Crystal5 = 45251, + Crystal6 = 45252, + Crystal7 = 45253, + Crystal8 = 45254, + AllCrystals = 45255, + }, + Habitats = { + Roshamuul = 45256, + Grass = 45257, + Mushroom = 45258, + Desert = 45259, + Venom = 45260, + Ice = 45261, + Corrupted = 45262, + Dimension = 45263, + AllHabitats = 45264, + }, + Elements = { + First = 45265, + Second = 45266, + Third = 45267, + Four = 45268, + Active = 45269, + Done = 45270, + }, + TheRiteOfEternalNight = 45271, + StoneCoffinsBones = 45272, + VampireTeeth = 45273, + }, Krailos = {}, - RiftWarriorOutfits = {}, }, U10_94 = { -- update 10.94 - Reserved Storages 45351 - 45450 HeartOfDestruction = {}, @@ -2769,43 +2824,7 @@ GlobalStorage = { Chance = 60020, Active = 60021, }, - FerumbrasAscendant = { - -- Reserved storage from 60030 - 60069 - ZamuloshSummon = 60030, - FerumbrasEssence = 60031, - DesperateSoul = 60032, - FlowerPuzzleTimer = 60033, - Crystals = { - Crystal1 = 60040, - Crystal2 = 60041, - Crystal3 = 60042, - Crystal4 = 60043, - Crystal5 = 60044, - Crystal6 = 60045, - Crystal7 = 60046, - Crystal8 = 60047, - AllCrystals = 60048, - }, - Habitats = { - Roshamuul = 60050, - Grass = 60051, - Mushroom = 60052, - Desert = 60053, - Venom = 60054, - Ice = 60055, - Corrupted = 60056, - Dimension = 60057, - AllHabitats = 60058, - }, - Elements = { - First = 60060, - Second = 60061, - Third = 60062, - Four = 60063, - Active = 60064, - Done = 60065, - }, - }, + HeroRathleton = { -- Reserved storage from 60070 - 60089 FirstMachines = 60070, @@ -2878,7 +2897,6 @@ GlobalStorage = { ExpBoost = 65004, SwordOfFury = 65005, GloothFairyTimer = 65006, - LionsRockFields = 65007, TheMummysCurse = 65008, OberonEventTime = 65009, PrinceDrazzakEventTime = 65010, @@ -2903,21 +2921,21 @@ startupGlobalStorages = { GlobalStorage.HeroRathleton.MaxxenRunning, GlobalStorage.HeroRathleton.LavaCounter, GlobalStorage.HeroRathleton.FourthMachines, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal1, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal2, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal3, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal4, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal5, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal6, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal7, - GlobalStorage.FerumbrasAscendant.Crystals.Crystal8, - GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals, - GlobalStorage.FerumbrasAscendant.FerumbrasEssence, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8, + Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, + Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, GlobalStorage.Feroxa.Active, - GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, - GlobalStorage.FerumbrasAscendant.Elements.Active, - GlobalStorage.FerumbrasAscendant.Elements.First, - GlobalStorage.FerumbrasAscendant.Elements.Second, - GlobalStorage.FerumbrasAscendant.Elements.Third, - GlobalStorage.FerumbrasAscendant.Elements.Done, + Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, + Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, + Storage.Quest.U10_90.FerumbrasAscension.Elements.First, + Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, + Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, + Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, } diff --git a/data-otservbr-global/monster/humans/necromancer_servant.lua b/data-otservbr-global/monster/humans/necromancer_servant.lua index 87ef0c03885..b6fa4e885d5 100644 --- a/data-otservbr-global/monster/humans/necromancer_servant.lua +++ b/data-otservbr-global/monster/humans/necromancer_servant.lua @@ -20,6 +20,10 @@ monster.corpse = 18174 monster.speed = 105 monster.manaCost = 0 +monster.events = { + "NecromancerServantDeath", +} + monster.changeTarget = { interval = 5000, chance = 8, @@ -59,7 +63,14 @@ monster.voices = { chance = 10, } -monster.loot = {} +monster.loot = { + { name = "gold coin", chance = 74230, maxCount = 70 }, + { name = "poison arrow", chance = 74230, maxCount = 5 }, + { name = "book of necromantic rituals", chance = 74230 }, + { name = "incantation fragment", chance = 100000 }, + { name = "necromantic robe", chance = 54230 }, + { name = "boots of haste", chance = 5000 }, +} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -45 }, diff --git a/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua b/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua index c64a01061b9..61eb2974aa5 100644 --- a/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua +++ b/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua @@ -14,7 +14,7 @@ monster.outfit = { } monster.events = { - "ShargonDeath", + "DeathPriestShargonDeath", } monster.bosstiary = { @@ -61,10 +61,6 @@ monster.flags = { canWalkOnPoison = true, } -monster.events = { - "ShargonKill", -} - monster.light = { level = 0, color = 0, diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ascending_ferumbras.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ascending_ferumbras.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ascending_ferumbras.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ascending_ferumbras.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/death_dragon.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/death_dragon.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/destabilized_ferumbras.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/destabilized_ferumbras.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/enraged_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/enraged_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/enraged_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/enraged_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_soul_splinter.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_soul_splinter.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/redeemed_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/redeemed_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/redeemed_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/redeemed_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/sin_devourer.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/sin_devourer.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/sin_devourer.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/sin_devourer.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_lord_of_the_lice.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_lord_of_the_lice.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_lord_of_the_lice.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_lord_of_the_lice.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_shatterer.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_shatterer.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_shatterer.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_shatterer.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh2.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh2.lua similarity index 98% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh2.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh2.lua index 5adb3a046bc..e3f7a2cfceb 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh2.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh2.lua @@ -14,10 +14,6 @@ monster.outfit = { lookMount = 0, } -monster.events = { - "AscendantBossesDeath", -} - monster.health = 300000 monster.maxHealth = 300000 monster.race = "undead" diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh3.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh3.lua similarity index 98% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh3.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh3.lua index ec8cb0ade3a..bb0671d663a 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh3.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh3.lua @@ -15,7 +15,6 @@ monster.outfit = { } monster.events = { - "AscendantBossesDeath", "ZamuloshClone", } diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/damned_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/damned_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/damned_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/damned_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/desperate_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/desperate_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/desperate_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/desperate_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/disgusting_ooze.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/disgusting_ooze.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/ferumbras_essence.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/ferumbras_essence.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_deer.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_deer.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_deer.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_deer.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_frazzlemaw.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_frazzlemaw.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_polar_bear.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_polar_bear.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_polar_bear.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_polar_bear.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_rotworm.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_rotworm.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_rotworm.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_rotworm.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_scorpion.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_scorpion.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_scorpion.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_scorpion.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_snake.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_snake.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_snake.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_snake.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_souleater.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_souleater.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_souleater.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_souleater.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_yielothax.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_yielothax.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/rage_of_mazoran.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/rage_of_mazoran.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/rage_of_mazoran.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/rage_of_mazoran.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/summons/enthralled_demon.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/summons/enthralled_demon.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_fragment.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_fragment.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_fragment.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_fragment.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_invader.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_invader.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_invader.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_invader.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/bone_capsule.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/traps/bone_capsule.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/traps/bone_capsule.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/traps/bone_capsule.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/despair.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/traps/despair.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/traps/despair.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/traps/despair.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/electric_sparks.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/traps/electric_sparks.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/traps/electric_sparks.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/traps/electric_sparks.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/eruption_of_destruction.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/traps/eruption_of_destruction.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/traps/eruption_of_destruction.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/traps/eruption_of_destruction.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/guilt.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/traps/guilt.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/traps/guilt.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/traps/guilt.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/void.lua b/data-otservbr-global/monster/quests/ferumbras_ascension/traps/void.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascendant/traps/void.lua rename to data-otservbr-global/monster/quests/ferumbras_ascension/traps/void.lua diff --git a/data-otservbr-global/npc/a_beggar.lua b/data-otservbr-global/npc/a_beggar.lua index b82b41f86be..91e95946f90 100644 --- a/data-otservbr-global/npc/a_beggar.lua +++ b/data-otservbr-global/npc/a_beggar.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end if MsgContains(message, "want") then - if player:getStorageValue(Storage.DarkTrails.Mission01) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01) == 1 then npcHandler:setTopic(playerId, 1) end npcHandler:say("The guys from the magistrate sent you here, didn't they?", npc, creature) @@ -72,8 +72,8 @@ local function creatureSayCallback(npc, creature, type, message) "If you brought enough of the stuff you'll see that the king will grant you entrance in his {palace}.", }, npc, creature, 100) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.DarkTrails.Mission01, 2) -- Mission 1 end - player:setStorageValue(Storage.DarkTrails.Mission02, 1) -- Mission 2 start + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01, 2) -- Mission 1 end + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission02, 1) -- Mission 2 start end end return true diff --git a/data-otservbr-global/npc/a_behemoth.lua b/data-otservbr-global/npc/a_behemoth.lua index 90d69692804..fe06f68c87e 100644 --- a/data-otservbr-global/npc/a_behemoth.lua +++ b/data-otservbr-global/npc/a_behemoth.lua @@ -51,7 +51,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -67,7 +67,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_dragon_lord.lua b/data-otservbr-global/npc/a_dragon_lord.lua index cb675223c9a..d9f8ec599b4 100644 --- a/data-otservbr-global/npc/a_dragon_lord.lua +++ b/data-otservbr-global/npc/a_dragon_lord.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_drillworm.lua b/data-otservbr-global/npc/a_drillworm.lua index 3926cd2e616..b5ca4e30b73 100644 --- a/data-otservbr-global/npc/a_drillworm.lua +++ b/data-otservbr-global/npc/a_drillworm.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_basher.lua b/data-otservbr-global/npc/a_lost_basher.lua index 8e9f09fa87a..7f590caa367 100644 --- a/data-otservbr-global/npc/a_lost_basher.lua +++ b/data-otservbr-global/npc/a_lost_basher.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_husher.lua b/data-otservbr-global/npc/a_lost_husher.lua index ffc3c939229..fb12261e2f2 100644 --- a/data-otservbr-global/npc/a_lost_husher.lua +++ b/data-otservbr-global/npc/a_lost_husher.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_thrower.lua b/data-otservbr-global/npc/a_lost_thrower.lua index c76d9ff5f2f..2b3a419cfef 100644 --- a/data-otservbr-global/npc/a_lost_thrower.lua +++ b/data-otservbr-global/npc/a_lost_thrower.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_nightmare_scion.lua b/data-otservbr-global/npc/a_nightmare_scion.lua index 2edccc9de07..f6727500fd5 100644 --- a/data-otservbr-global/npc/a_nightmare_scion.lua +++ b/data-otservbr-global/npc/a_nightmare_scion.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_strange_fellow.lua b/data-otservbr-global/npc/a_strange_fellow.lua index 24b2f8a96cc..63213c31e96 100644 --- a/data-otservbr-global/npc/a_strange_fellow.lua +++ b/data-otservbr-global/npc/a_strange_fellow.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if player:getStorageValue(Storage.Postman.Mission03) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) ~= 1 then return true end if MsgContains(message, "bill") then @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if player:removeItem(3216, 1) and npcHandler:getTopic(playerId) == 7 then npcHandler:say("Ok, ok, I'll take it. I guess I have no other choice anyways. And now leave me alone in my misery please.", npc, creature) - player:setStorageValue(Storage.Postman.Mission03, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 2) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "hat") then diff --git a/data-otservbr-global/npc/a_sweaty_cyclops.lua b/data-otservbr-global/npc/a_sweaty_cyclops.lua index b045b2ad1b4..712288aeb66 100644 --- a/data-otservbr-global/npc/a_sweaty_cyclops.lua +++ b/data-otservbr-global/npc/a_sweaty_cyclops.lua @@ -70,8 +70,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", npc, creature) - if player:getStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart) ~= 1 then - player:setStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart) ~= 1 then + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) end player:setStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops, 1) npcHandler:setTopic(playerId, 3) @@ -101,8 +101,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", npc, creature) - if player:getStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart) ~= 1 then - player:setStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart) ~= 1 then + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) end player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, 1) npcHandler:setTopic(playerId, 3) diff --git a/data-otservbr-global/npc/a_vulcongra.lua b/data-otservbr-global/npc/a_vulcongra.lua index 3c844506ea6..ff8fc5e1563 100644 --- a/data-otservbr-global/npc/a_vulcongra.lua +++ b/data-otservbr-global/npc/a_vulcongra.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_wyrm.lua b/data-otservbr-global/npc/a_wyrm.lua index a2bdeaca8e4..c2a6d10adb6 100644 --- a/data-otservbr-global/npc/a_wyrm.lua +++ b/data-otservbr-global/npc/a_wyrm.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/ahmet.lua b/data-otservbr-global/npc/ahmet.lua index b9d8ecc914b..8a3db7e2d97 100644 --- a/data-otservbr-global/npc/ahmet.lua +++ b/data-otservbr-global/npc/ahmet.lua @@ -115,13 +115,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "mission") or MsgContains(message, "quest") then - if player:getStorageValue(Storage.QuestChests.StealFromThieves) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) < 1 then npcHandler:say({ "What are you talking about?? I was robbed!!!! Someone catch those filthy thieves!!!!! GUARDS! ...", ".... Like usual, they hide at the slightest sign of trouble! YOU! Want to earn some quick money?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.QuestChests.StealFromThieves) == 1 or player:getStorageValue(Storage.QuestChests.StealFromThieves) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) == 1 or player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) == 2 then npcHandler:say("Did you find my stuff?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -144,11 +144,11 @@ local function creatureSayCallback(npc, creature, type, message) " I saw them running out of town and then to the north. Maybe they hide at the oasis.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.QuestChests.StealFromThieves, 1) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves, 1) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(235, 1) then npcHandler:say("GREAT! If you ever need a job as my personal security guard, let me know. Here is the reward I promised you.", npc, creature) - player:setStorageValue(Storage.QuestChests.StealFromThieves, 3) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves, 3) player:addItem(3031, 100) player:addItem(3725, 100) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/ajax.lua b/data-otservbr-global/npc/ajax.lua index 209d75d2447..7421c9f7a65 100644 --- a/data-otservbr-global/npc/ajax.lua +++ b/data-otservbr-global/npc/ajax.lua @@ -132,12 +132,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 11) end elseif MsgContains(message, "axe") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 16 and player:getStorageValue(Storage.OutfitQuest.BarbarianAddonWaitTimer) < os.time() then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 16 and player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddonWaitTimer) < os.time() then npcHandler:say("Axe is done! For you. Take. Wear like me.", npc, creature) player:addOutfitAddon(147, 1) player:addOutfitAddon(143, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 17) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 17) player:addAchievement("Brutal Politeness") else npcHandler:say("Axe is not done yet!", npc, creature) diff --git a/data-otservbr-global/npc/alia.lua b/data-otservbr-global/npc/alia.lua index ec100c289ea..361d1089b3c 100644 --- a/data-otservbr-global/npc/alia.lua +++ b/data-otservbr-global/npc/alia.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/amanda.lua b/data-otservbr-global/npc/amanda.lua index 1b4630cfcee..7c00993f158 100644 --- a/data-otservbr-global/npc/amanda.lua +++ b/data-otservbr-global/npc/amanda.lua @@ -52,19 +52,19 @@ end -- Mission (Tibia Tales: Rest In Hallowed Ground) local startMissionKeyword = keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = "Well, I would do it myself but I can't leave town for a longer time. Would you be so kind to bring me a vial of holy water from the White Raven Monastery?" }, function(player) - return player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == -1 + return player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == -1 end) startMissionKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "I thank you a lot in advance. The power of the holy water from the White Raven Monastery is legendary. For my task it is indispensable. We talk about that when you get back.", reset = true }, nil, function(player) - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 1) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 1) end) startMissionKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "It's your decision. I will ask the next believing mind that visits the temple of Banor's blood.", reset = true }) local function addMissionKeyword(text, value, newValue, addItem) keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = text }, function(player) - return player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == value + return player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == value end, function(player) if newValue then - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, newValue) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, newValue) end if addItem then @@ -100,11 +100,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Amanda) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Amanda) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Amanda, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Amanda, 1) end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for 30 gold?" }) diff --git a/data-otservbr-global/npc/arito.lua b/data-otservbr-global/npc/arito.lua index 1eab9a186c3..a4a907c87e4 100644 --- a/data-otservbr-global/npc/arito.lua +++ b/data-otservbr-global/npc/arito.lua @@ -51,7 +51,7 @@ npcType.onCloseChannel = function(npc, creature) end local function greetCallback(npc, player) - if player:getStorageValue(Storage.TibiaTales.AritosTask) == 2 then + if player:getStorageValue(Storage.Quest.U8_1.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.") @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) + local AritosTask = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) -- Check if the message contains "nomads" if MsgContains(message, "nomads") then @@ -90,10 +90,10 @@ local function creatureSayCallback(npc, creature, type, message) "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) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.TibiaTales.AritosTask, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 1) 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) @@ -101,7 +101,7 @@ local function creatureSayCallback(npc, creature, type, message) -- 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:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 3) player:addItem(3035, 100) end diff --git a/data-otservbr-global/npc/azalea.lua b/data-otservbr-global/npc/azalea.lua index 1dd4ff5f8a5..6568b427b9c 100644 --- a/data-otservbr-global/npc/azalea.lua +++ b/data-otservbr-global/npc/azalea.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/barazbaz.lua b/data-otservbr-global/npc/barazbaz.lua index 3421dd672f2..162a30899b1 100644 --- a/data-otservbr-global/npc/barazbaz.lua +++ b/data-otservbr-global/npc/barazbaz.lua @@ -54,17 +54,17 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if MsgContains(message, "ritual") and player:getStorageValue(Storage.DarkTrails.Mission06) == 1 then + if MsgContains(message, "ritual") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission06) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission07) < 1 then npcHandler:say({ - "Ancient structures in the sewers you say? Well, our city has had a certain bloody past, even before it has \z - been city at all. But to investigate the archives for what you may have found is a time-consuming process. ...", + "Ancient structures in the sewers you say? Well, our city has had a certain bloody past, even before it has been city at all. But to investigate the archives for what you may have found is a time-consuming process. ...", "Usually, I'm too much bound to my duties to the city to sacrifice time for such an endeavour. ...", "But on the other hand, just now is the time of an important decision of the magistrate concerning the funding of the archives. It is a matter easily overlooked by our good citizens. ...", "If you'd be so kind to place just one of your votes for the funding of the archives, I would be inclined to take the time for your investigation in turn. ...", "Just go to Marvin in the magistrate and vote for a greater funding of the archives. Afterwards, I might be able to present you with some first results of my investigations on your behalf.", }, npc, creature, 10) - player:setStorageValue(Storage.DarkTrails.Mission07, 1) - elseif MsgContains(message, "abandoned sewers") and player:getStorageValue(Storage.DarkTrails.Mission08) == 1 then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission07, 1) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "abandoned sewers") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission08) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09) < 1 then npcHandler:say({ "Excellent! Concerning the ancient ruins that you have found, well, if you are not familiar with the city's history, feel free to browse a few books here. I will only refer to some basics here, so I don't waste your time. ...", "The first humans that lived here and that we have any records of lived in slavery of an ancient evil. ...", @@ -73,20 +73,24 @@ local function creatureSayCallback(npc, creature, type, message) "Something like the ruins you have found. What you have seen there hints to a new incident, though. As if someone or something was searching for something. In the past, when those ruins were buried, people were primitive and superstitious. ...", "Today, we have advanced far more and could have the ruins investigated in a far more efficient way. And that is what I would just recommend you to do: get a necrometer from magistrate Jondrin upstairs and investigate the ruins thoroughly.", }, npc, creature, 10) - player:setStorageValue(Storage.DarkTrails.Mission09, 1) - elseif (MsgContains(message, "notebook")) and (player:getStorageValue(Storage.DarkTrails.Mission11) == 1 and getPlayerItemCount(creature, 11450) == 1) then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09, 1) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "notebook") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission11) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission12) < 1 and player:getItemCount(11450) >= 1 then npcHandler:say({ - " I know that handwriting you describe! It belongs to a traveller from far away. Magistrate Sholley introduced him to me and she was quite excited to learn more about our city's past. ...", + "I know that handwriting you describe! It belongs to a traveller from far away. Magistrate Sholley introduced him to me and she was quite excited to learn more about our city's past. ...", "I should have thought of him right in the beginning when I heard the stuff you mentioned. But I haven't seen him for a while. You should ask Sholley about her friend to learn about his whereabouts.", }, npc, creature, 10) - player:setStorageValue(Storage.DarkTrails.Mission12, 1) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission12, 1) doPlayerRemoveItem(creature, 11450, 1) + npcHandler:setTopic(playerId, 0) else npcHandler:say("You need to kill the {The Ravager}, click on statue and then come here say {ritual}, {abandoned sewers}, {notebook} and after this find Roswitha and talk with she.", npc, creature) + npcHandler:setTopic(playerId, 0) end return true end +npcHandler:setMessage(MESSAGE_GREET, "Oh, hello there!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/barnabas_dee.lua b/data-otservbr-global/npc/barnabas_dee.lua index 9359d320a5d..50c6bcef9f4 100644 --- a/data-otservbr-global/npc/barnabas_dee.lua +++ b/data-otservbr-global/npc/barnabas_dee.lua @@ -55,38 +55,42 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Oramond.PeppermoonBell) < 1 then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission) == 1 then + npcHandler:say("Do you already have 15 units of blue pollen with you?", npc, creature) + npcHandler:setTopic(playerId, 1) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission) < 1 then npcHandler:say({ "I am afraid my supplies of peppermoon bell powder have gone flat again. Please provide me with the pollen of this flower. ...", - "It only blooms underground in a cavern to the northwest. I will need 15 units of pollen. Bring them to me and we shall conduct a séance.", + "It only blooms underground in a cavern to the northwest. I will need 15 units of pollen. Bring them to me and we shall conduct a seance.", }, npc, creature) - player:setStorageValue(Storage.Oramond.PeppermoonBell, 1) - player:setStorageValue(Storage.Oramond.PeppermoonBellCount, 0) - npcHandler:setTopic(playerId, 0) - if player:getStorageValue(Storage.Oramond.QuestLine) < 1 then - player:setStorageValue(Storage.Oramond.QuestLine, 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) end - elseif player:getStorageValue(Storage.Oramond.PeppermoonBell) == 1 then - npcHandler:say("Ah! Did you bring me the peppermoon bell pollen I asked for?", npc, creature) - npcHandler:setTopic(playerId, 1) + npcHandler:setTopic(playerId, 0) end - end - if MsgContains(message, "yes") then + elseif MsgContains(message, "seance") and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16) < 1 then + npcHandler:say("Ah! Did you bring me the peppermoon bell pollen I asked for?", npc, creature) + npcHandler:setTopic(playerId, 1) + elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - if player:getStorageValue(Storage.Oramond.PeppermoonBellCount) >= 15 then - if player:getStorageValue(Storage.DarkTrails.Mission15) == 1 then + if player:getItemCount(21089) >= 15 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15) == 1 then npcHandler:say("Ah! Well done! Now we shall proceed with the seance, yes?", npc, creature) - player:setStorageValue(Storage.Oramond.PeppermoonBell, -1) - player:setStorageValue(Storage.Oramond.PeppermoonBellCount, -15) - player:setStorageValue(Storage.DarkTrails.Mission15, 2) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission, -1) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15, 2) player:removeItem(21089, 15) npcHandler:setTopic(playerId, 2) else npcHandler:say("Ah! Well done! These 15 doses will suffice for now. Here, take this vote for your effort.", npc, creature) - player:setStorageValue(Storage.Oramond.PeppermoonBell, -1) - player:setStorageValue(Storage.Oramond.PeppermoonBellCount, -15) - player:setStorageValue(Storage.Oramond.VotingPoints, player:getStorageValue(Storage.Oramond.VotingPoints) + 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission, -1) player:removeItem(21089, 15) + local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) + if currentVotingPoints == -1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) + else + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) + end npcHandler:setTopic(playerId, 0) end else @@ -111,17 +115,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 5) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say("Ahhhhhhhh! ", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission15, 3) - player:teleportTo(Position(33490, 32037, 8)) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15, 3) + player:teleportTo(Position(33467, 32048, 8)) player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "seance") then - if player:getStorageValue(Storage.DarkTrails.Mission15) == 3 then - npcHandler:say("Splendid. Let me make the final preparations... There. Are you ready, too?", npc, creature) - npcHandler:setTopic(playerId, 3) - end end + return true end diff --git a/data-otservbr-global/npc/benjamin.lua b/data-otservbr-global/npc/benjamin.lua index ce3858886dc..4e4d908dcbe 100644 --- a/data-otservbr-global/npc/benjamin.lua +++ b/data-otservbr-global/npc/benjamin.lua @@ -68,10 +68,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "measurements") then local player = Player(creature) - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsBenjamin) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin) ~= 1 then npcHandler:say("Oh they don't change that much since in the old days as... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsBenjamin, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/bertram.lua b/data-otservbr-global/npc/bertram.lua index 876c8ddf79d..4f908a68758 100644 --- a/data-otservbr-global/npc/bertram.lua +++ b/data-otservbr-global/npc/bertram.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "key") 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 + if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 then player:addItem(7934, 1) player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say( diff --git a/data-otservbr-global/npc/boozer.lua b/data-otservbr-global/npc/boozer.lua index b63fa7620fb..40601c0b5ec 100644 --- a/data-otservbr-global/npc/boozer.lua +++ b/data-otservbr-global/npc/boozer.lua @@ -59,21 +59,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) == 2 and player:removeItem(136, 1) then - player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 3) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) == 2 and player:removeItem(136, 1) then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 3) npcHandler:setTopic(playerId, 0) player:addItem(5710, 1) player:addItem(3035, 10) player:addExperience(100, true) npcHandler:say("Yessss! Now I only need to build my own small brewery, figure out the secret recipe, duplicate the dwarvish brew and BANG I'll be back in business! Here take this as a reward.", npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) < 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say("Shush!! I don't want everybody to know what I am up to. Listen, things are not going too well, I need a new attraction. Do you want to help me?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 1) player:addItem(138, 1) npcHandler:say("Good! Listen closely. Take this bottle and go to Kazordoon. I need a sample of their very special brown ale. You may find a cask in their brewery. Come back as soon as you got it.", npc, creature) end diff --git a/data-otservbr-global/npc/brewster.lua b/data-otservbr-global/npc/brewster.lua index 3314d49c2d2..0ba87f44ebf 100644 --- a/data-otservbr-global/npc/brewster.lua +++ b/data-otservbr-global/npc/brewster.lua @@ -84,11 +84,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Brewster) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Brewster) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Brewster, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Brewster, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/brodrosch.lua b/data-otservbr-global/npc/brodrosch.lua index 518d90efa52..96c0f43bad5 100644 --- a/data-otservbr-global/npc/brodrosch.lua +++ b/data-otservbr-global/npc/brodrosch.lua @@ -123,8 +123,8 @@ end, function(player) end) addTravelKeyword("cormaya", { "Do you seek a ride to Cormaya for |TRAVELCOST|?", "Full steam ahead!", "We would like to serve you some time." }, 160, { "postman" }, Position(33311, 31989, 15), function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 4 then - player:setStorageValue(Storage.Postman.Mission01, 5) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 4 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 5) end end) diff --git a/data-otservbr-global/npc/budrik.lua b/data-otservbr-global/npc/budrik.lua index e874f8b91f5..316d86ed05c 100644 --- a/data-otservbr-global/npc/budrik.lua +++ b/data-otservbr-global/npc/budrik.lua @@ -58,21 +58,21 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "mission", "quest" }, message:lower()) then - if player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.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.TibiaTales.ToOutfoxAFoxQuest.Questline) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline) == 1 then if player:removeItem(139, 1) then - player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 2) + player:setStorageValue(Storage.Quest.U8_1.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.TibiaTales.ToOutfoxAFoxQuest.Questline) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) < 0 then + elseif player:getStorageValue(Storage.Quest.U8_1.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?", @@ -100,10 +100,10 @@ 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) - if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 1) + player:setStorageValue(Storage.Quest.U8_1.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) diff --git a/data-otservbr-global/npc/captain_bluebear.lua b/data-otservbr-global/npc/captain_bluebear.lua index 8c0100583d4..fd2bcd2369a 100644 --- a/data-otservbr-global/npc/captain_bluebear.lua +++ b/data-otservbr-global/npc/captain_bluebear.lua @@ -68,8 +68,8 @@ local function addTravelKeyword(keyword, cost, destination, action, condition) end addTravelKeyword("carlin", 110, Position(32387, 31820, 6), function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 1 then - player:setStorageValue(Storage.Postman.Mission01, 2) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 1 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 2) end end) diff --git a/data-otservbr-global/npc/captain_haba.lua b/data-otservbr-global/npc/captain_haba.lua index 2d5bdef598a..fd284e4309b 100644 --- a/data-otservbr-global/npc/captain_haba.lua +++ b/data-otservbr-global/npc/captain_haba.lua @@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then 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(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/captain_seahorse.lua b/data-otservbr-global/npc/captain_seahorse.lua index 05fc5c856e0..1f2ca7a0b98 100644 --- a/data-otservbr-global/npc/captain_seahorse.lua +++ b/data-otservbr-global/npc/captain_seahorse.lua @@ -58,8 +58,8 @@ local function addTravelKeyword(keyword, cost, destination, action) end addTravelKeyword("venore", 40, Position(32954, 32022, 6), function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 3 then - player:setStorageValue(Storage.Postman.Mission01, 4) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 3 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 4) end end) addTravelKeyword("thais", 160, Position(32310, 32210, 6)) diff --git a/data-otservbr-global/npc/cedrik.lua b/data-otservbr-global/npc/cedrik.lua index 04778320b96..e54ee58c041 100644 --- a/data-otservbr-global/npc/cedrik.lua +++ b/data-otservbr-global/npc/cedrik.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/chantalle.lua b/data-otservbr-global/npc/chantalle.lua index 7986419417a..7164455312e 100644 --- a/data-otservbr-global/npc/chantalle.lua +++ b/data-otservbr-global/npc/chantalle.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "key") 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 + if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 and player:getSex() ~= PLAYERSEX_FEMALE then player:addItem(7934) 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) diff --git a/data-otservbr-global/npc/charos.lua b/data-otservbr-global/npc/charos.lua index defab150d53..3d02aee46d1 100644 --- a/data-otservbr-global/npc/charos.lua +++ b/data-otservbr-global/npc/charos.lua @@ -69,7 +69,7 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.AdventurersGuild.CharosTrav) > 6 then + if player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav) > 6 then npcHandler:say("Sorry, you have traveled a lot.", npc, creature) npcHandler:resetNpc(creature) return false @@ -94,7 +94,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 0 then if MsgContains(message, "yes") then - npcHandler:say("Fine. You have " .. -player:getStorageValue(Storage.AdventurersGuild.CharosTrav) + 7 .. " \z + npcHandler:say("Fine. You have " .. -player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav) + 7 .. " \z attunements left. What is the new city of your choice? Thais, Carlin, Ab'Dendriel, Kazordoon, Venore, \z Ankrahmun, Edron, Darashia, Liberty Bay or Port Hope?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -102,8 +102,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 1 then local cityTable = config.towns[message:lower()] if cityTable then - player:setStorageValue(Storage.AdventurersGuild.CharosTrav, player:getStorageValue(Storage.AdventurersGuild.CharosTrav) + 1) - player:setStorageValue(Storage.AdventurersGuild.Stone, cityTable) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav, player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav) + 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone, cityTable) npcHandler:say("Goodbye traveler!", npc, creature) else npcHandler:say("Sorry, I don't know about this place.", npc, creature) diff --git a/data-otservbr-global/npc/chavis.lua b/data-otservbr-global/npc/chavis.lua index 7b685cd145c..0d59a7893f2 100644 --- a/data-otservbr-global/npc/chavis.lua +++ b/data-otservbr-global/npc/chavis.lua @@ -60,36 +60,45 @@ local function creatureSayCallback(npc, creature, type, message) -- START TASK if MsgContains(message, "food") then - if player:getStorageValue(Storage.Oramond.MissionToTakeRoots) <= 0 then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) < 1 then npcHandler:say({ "Hey there, just to let you know - I am not a man of many words. I prefer 'deeds', you see? The poor of this city will not feed themselves. ...", "So in case you've got nothing better to do - and it sure looks that way judging by how long you're already loitering around in front of my nose - please help us. ...", "If you can find some of the nutritious, juicy {roots} in the outskirts of Rathleton, bring them here. We will gladly take bundles of five roots each, and hey - helping us, helps you in the long term, trust me.", }, npc, creature, 10) - if player:getStorageValue(Storage.Oramond.QuestLine) <= 0 then - player:setStorageValue(Storage.Oramond.QuestLine, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) end - player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Oramond.MissionToTakeRoots) == 1 then - if player:getStorageValue(Storage.Oramond.HarvestedRootCount) < 5 then + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) < 5 then npcHandler:say("I am sorry, you didn't harvest enough roots. You need to harvest a bundle of at least five roots - and please try doing it yourself.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Oramond.HarvestedRootCount) >= 5 then + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) >= 5 then npcHandler:say("Yes? You brought some juicy roots? How nice of you - that's one additional voice in the {magistrate} of {Rathleton} for you! ...", npc, creature) npcHandler:setTopic(playerId, 1) end end - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then - npcHandler:say("Spend it wisely, though, put in a word for the poor, will ye? Sure you will.", npc, creature) - player:setStorageValue(Storage.Oramond.VotingPoints, player:getStorageValue(Storage.Oramond.VotingPoints) + 1) - - player:setStorageValue(Storage.Oramond.HarvestedRootCount, player:getStorageValue(Storage.Oramond.HarvestedRootCount) - 5) - player:removeItem(21291, 5) - - player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 0) - player:setStorageValue(Storage.Oramond.DoorBeggarKing, 1) - npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 1 and player:removeItem(21291, 5) then + npcHandler:say("Spend it wisely, though, put in a word for the poor, will ye? Sure you will.", npc, creature) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count, player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) - 5) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, -1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door, 1) + end + local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) + if currentVotingPoints == -1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) + else + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) + end + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("You don't have enough items.", npc, creature) + npcHandler:setTopic(playerId, 0) + end elseif MsgContains(message, "root") then npcHandler:say("They are nutritious, cost nothing and are good for the body hair. If you can bring us bundles of five juicy roots each - we will make it worth your while for the {magistrate}.", npc, creature) npcHandler:setTopic(playerId, 0) @@ -102,6 +111,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature, 10) npcHandler:setTopic(playerId, 0) end + return true end diff --git a/data-otservbr-global/npc/chrystal.lua b/data-otservbr-global/npc/chrystal.lua index 54c70da0e81..60713967280 100644 --- a/data-otservbr-global/npc/chrystal.lua +++ b/data-otservbr-global/npc/chrystal.lua @@ -59,10 +59,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsChrystal) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsChrystal) ~= 1 then npcHandler:say("If its necessary ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsChrystal, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsChrystal, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/corym_ratter.lua b/data-otservbr-global/npc/corym_ratter.lua index 91cc127471b..3615692dce4 100644 --- a/data-otservbr-global/npc/corym_ratter.lua +++ b/data-otservbr-global/npc/corym_ratter.lua @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) player:setStorageValue(HiddenThreats.QuestLine, 1) player:setStorageValue(HiddenThreats.RatterDoor, 1) npcHandler:say("Nice! I have opened the mine for you. But take care of you! The monsters of depth won't spare you.", npc, creature) diff --git a/data-otservbr-global/npc/costello.lua b/data-otservbr-global/npc/costello.lua index d338eb95f13..bfd95edc9d4 100644 --- a/data-otservbr-global/npc/costello.lua +++ b/data-otservbr-global/npc/costello.lua @@ -61,12 +61,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "diary") then - if player:getStorageValue(Storage.WhiteRavenMonastery.Diary) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary) == 1 then npcHandler:say("Do you want me to inspect a diary?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "holy water") then - local cStorage = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) + local cStorage = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) if cStorage == 1 then npcHandler:say("Who are you to demand holy water from the White Raven Monastery? Who sent you??", npc, creature) npcHandler:setTopic(playerId, 3) @@ -74,14 +74,14 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("I already filled your vial with holy water.", npc, creature) end elseif MsgContains(message, "amanda") and npcHandler:getTopic(playerId) == 0 then - if player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == 1 then npcHandler:say("Ahh, Amanda from Edron sent you! I hope she's doing well. So why did she send you here?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Thank you very much! From now on you may open the warded doors to the catacombs.", npc, creature) - player:setStorageValue(Storage.WhiteRavenMonastery.Diary, 1) - player:setStorageValue(Storage.WhiteRavenMonastery.Door, 1) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, 1) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, 1) elseif npcHandler:getTopic(playerId) == 2 then if not player:removeItem(3212, 1) then npcHandler:say("Uhm, as you wish.", npc, creature) @@ -90,7 +90,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("By the gods! This is brother Fugio's handwriting and what I read is horrible indeed! You have done our order a great favour by giving this diary to me! Take this blessed Ankh. May it protect you in even your darkest hours.", npc, creature) player:addItem(3214, 1) - player:setStorageValue(Storage.WhiteRavenMonastery.Diary, 2) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, 2) end elseif npcHandler:getTopic(playerId) == 3 then if not MsgContains(message, "amanda") then @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) end player:addItem(133, 1) - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 2) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 2) npcHandler:say("Ohh, why didn't you tell me before? Sure you get some holy water if it's for Amanda! Here you are.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "no") and table.contains({ 1, 2 }, npcHandler:getTopic(playerId)) then diff --git a/data-otservbr-global/npc/dalbrect.lua b/data-otservbr-global/npc/dalbrect.lua index 9fc3053b60c..87a23c48f32 100644 --- a/data-otservbr-global/npc/dalbrect.lua +++ b/data-otservbr-global/npc/dalbrect.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "brooch") then - if player:getStorageValue(Storage.WhiteRavenMonastery.Passage) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage) == 1 then npcHandler:say("You have recovered my brooch! I shall forever be in your debt, my friend!", npc, creature) return true end @@ -94,8 +94,8 @@ local function creatureSayCallback(npc, creature, type, message) npc, creature ) - player:setStorageValue(Storage.WhiteRavenMonastery.QuestLog, 1) -- Quest log - player:setStorageValue(Storage.WhiteRavenMonastery.Passage, 1) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, 1) -- Quest log + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, 1) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then @@ -113,7 +113,7 @@ keywordHandler:addKeyword({ "passage" }, StdModule.say, { text = "I have only sailed to the isle of the kings once or twice. \z I dare not anger the monks by bringing travelers there without their permission.", }, function(player) - return player:getStorageValue(Storage.WhiteRavenMonastery.Passage) ~= 1 + return player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage) ~= 1 end) local travelNode = keywordHandler:addKeyword({ "passage" }, StdModule.say, { diff --git a/data-otservbr-global/npc/daniel_steelsoul.lua b/data-otservbr-global/npc/daniel_steelsoul.lua index 9f3427a9b1e..1beb347c2d8 100644 --- a/data-otservbr-global/npc/daniel_steelsoul.lua +++ b/data-otservbr-global/npc/daniel_steelsoul.lua @@ -64,11 +64,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say("Very good, we need heroes like you to go on a suici.....er....to earn respect of the authorities here AND in addition get a great reward for it. Are you interested in the job?", npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) == 5 then - player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, 6) + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) == 5 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, 6) npcHandler:setTopic(playerId, 0) player:addItem(814, 1) npcHandler:say("What? YOU DID IT?!?! That's...that's...er.... like I expected!! Here is your reward.", npc, creature) @@ -173,8 +173,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, 1) npcHandler:say({ "Very well, maybe you know that the orcs here in Edron learnt to raise giant spiders. It is going to become a serious threat. ...", "The mission is simple: go to the orcs and destroy all spider eggs that are hatched by the giant spider they have managed to catch. The orcs are located in the south of the western part of the island.", diff --git a/data-otservbr-global/npc/dermot.lua b/data-otservbr-global/npc/dermot.lua index 3f66f7f89ec..ddaeda5cc86 100644 --- a/data-otservbr-global/npc/dermot.lua +++ b/data-otservbr-global/npc/dermot.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "present") then - if player:getStorageValue(Storage.Postman.Mission05) == 2 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05) == 2 then npcHandler:say("You have a present for me?? Realy?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -70,7 +70,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3218, 1) then npcHandler:say("Thank you very much!", npc, creature) - player:setStorageValue(Storage.Postman.Mission05, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/doubleday.lua b/data-otservbr-global/npc/doubleday.lua index ff57ada9c76..9476f544aea 100644 --- a/data-otservbr-global/npc/doubleday.lua +++ b/data-otservbr-global/npc/doubleday.lua @@ -50,6 +50,113 @@ 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() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + if MsgContains(message, "experiment") then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) == -1 then + npcHandler:say({ + "Yes, well I am working on something very time-consuming at the moment. You see, a lot of us don't have time to go out much, to converse even just to meet and talk about recent discoveries. ...", + "So I thought about a device to help communication in this wonderful city. I already had a helper, he was easily... 'stressed' and quit. Didn't have time to find a new one. ...", + "So, if you'd like to help - there is a lot to do for me to bring my plans to fruition - and if you help me, you will earn my {votes} for the {magistrate} in turn! Are you in?", + }, npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 1 then + npcHandler:say({ + "Good! Quite good! You know, there are actually several things I want you to address. ...", + "First, there is the problem with {communication}, second I need someone to {probe} part of the sewers and last - {combinatorics}!", + }, npc, creature) + npcHandler:setTopic(playerId, 2) + elseif npcHandler:getTopic(playerId) == 3 then + npcHandler:say("Very nice, there you go! Just bring me the printout from the probe after deploying it! You can request a new probing {device} or a new {detector} if you lose it - but it takes some time for me to get a new one ready so be careful with that stuff.", npc, creature) + player:addItem(21192, 1) + player:addItem(21208, 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.MonoDetector, os.time() + 30 * 60) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 5 then + npcHandler:say("Hey, let's try to be reasonable here, alright? That's a bit too much for what you did, isn't it? It may seem that way but the number of votes I can offer isn't limitless.", npc, creature) + npcHandler:setTopic(playerId, 6) + elseif npcHandler:getTopic(playerId) == 8 then + npcHandler:say("Good, you just gained 1 genuine votes in the magistrate!", npc, creature) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, -1) + local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) + if currentVotingPoints == -1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) + else + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 9 then + npcHandler:say("Alright, there you go - please, try to be more careful with my equipment next time!", npc, creature) + player:addItem(21192, 1) + player:addItem(21208, 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.MonoDetector, os.time() + 30 * 60) + npcHandler:setTopic(playerId, 0) + end + elseif MsgContains(message, "probe") then + if npcHandler:getTopic(playerId) == 2 then + npcHandler:say({ + "Because of my {experiments} with the {glooth}, some things in the new sewers of Rathleton aren't exactly 'in order' anymore - if you follow me. A sort of mushroom has formed down there and some... 'things' now nest in the lower drainage areas. ...", + "Could you please just go down there and check if this is caused by... my... version of the {glooth}? You know, just some experiments I did to alter the basic elemental structure of the {glooth}, nothing personal. ...", + "If you'd just take this very tiny probing device I designed to analyse the {coloured glooth} and, you know, go down there and place it - oh, and I'll also give you this really tiny {detector}, modified to find a spot where to place the {probe} - so?", + }, npc, creature) + npcHandler:setTopic(playerId, 3) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) == 2 then + npcHandler:say({ + "Very good, these readings do tell me a lot - the coloured glooth may be instable but it has some... 'interesting' effects on its surroundings. Oh - no worries, you will be perfectly safe. I will also take back my detector now, thanks. ..", + "Feel free to help me deploy more probes whenever you like.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, 3) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.OramondTaskProbing, 1) + npcHandler:setTopic(playerId, 0) + end + elseif MsgContains(message, "exchange") then + if npcHandler:getTopic(playerId) == 6 then + npcHandler:say("Well, let's see, you helped me 1 times before exchanging any votes - how many votes do you want me to give you in exchange?", npc, creature) + npcHandler:setTopic(playerId, 7) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) == 3 then + npcHandler:say("Well, let's see, you helped me 1 times before exchanging any votes - how many votes do you want me to give you in {exchange}?", npc, creature) + npcHandler:setTopic(playerId, 4) + end + elseif MsgContains(message, "2") then + if npcHandler:getTopic(playerId) == 4 then + npcHandler:say("Alright then, that's 2 vote(s) you want - I won't take them back, are you sure?", npc, creature) + npcHandler:setTopic(playerId, 5) + end + elseif MsgContains(message, "1") then + if npcHandler:getTopic(playerId) == 7 then + npcHandler:say("Alright then, that's 1 vote(s) you want - I won't take them back, are you sure?", npc, creature) + npcHandler:setTopic(playerId, 8) + end + elseif MsgContains(message, "mono detector") then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.MonoDetector) <= os.time() then + npcHandler:say({ + "To actually 'find' a suitable location to deploy the probing device for my measurements, you should use my mono detector. The device detects singular chemical structures of any material or fabric I feed it with and signals it! ...", + "If you have lost your detector or your probing device, I can hand out another - it will take some time, however. Do you need a new one?", + }, npc, creature) + npcHandler:setTopic(playerId, 9) + else + npcHandler:say("You must wait until the detector is ready again.", npc, creature) + end + end + + return true +end + +npcHandler:setMessage(MESSAGE_GREET, "Hello there, hmm just... just wait right there, I'll be with you in a second. Just getting this {experiment} done...") +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/dove.lua b/data-otservbr-global/npc/dove.lua index 2dadf044189..33ead9cf013 100644 --- a/data-otservbr-global/npc/dove.lua +++ b/data-otservbr-global/npc/dove.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsDove) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsDove) ~= 1 then npcHandler:say("Oh no! I knew that day would come! I am slightly above the allowed weight and if you can't supply me with some grapes to slim down I will get fired. Do you happen to have some grapes with you? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -70,8 +70,8 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3592, 1) then npcHandler:say("Oh thank you! Thank you so much! So listen ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsDove, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsDove, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Oh, you don't have it.", npc, creature) diff --git a/data-otservbr-global/npc/elliott.lua b/data-otservbr-global/npc/elliott.lua index ced6e923d8a..741cfe91162 100644 --- a/data-otservbr-global/npc/elliott.lua +++ b/data-otservbr-global/npc/elliott.lua @@ -54,68 +54,80 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - -- Mission 3 start if MsgContains(message, "abandoned sewers") then - if player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) < 21 then - npcHandler:say("You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", npc, creature) - npcHandler:say("But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", npc, creature) - npcHandler:setTopic(playerId, 0) - -- Mission 3 end - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 21 then - npcHandler:say("Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", npc, creature) - npcHandler:say("I hereby grant you the perMission to enter the abandoned part of the sewers. Take care, man! ...", npc, creature) - npcHandler:say("If you find something interesting, come back to talk about the {abandoned sewers}.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission04, 1) - player:setStorageValue(Storage.Oramond.DoorAbandonedSewer, 1) - npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then npcHandler:say("I'm glad to see you back alive and healthy. Did you find anything interesting that you want to {report}?", npc, creature) npcHandler:setTopic(playerId, 7) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then + npcHandler:say({ + "You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", + "But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) == 22 then + npcHandler:say({ + "Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", + "I hereby grant you the permission to enter the abandoned part of the sewers. Take care, man! ...", + "If you find something interesting, come back to talk about the {abandoned sewers}.", + }, npc, creature) + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04) < 1 then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04, 1) + end + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, -1) + npcHandler:setTopic(playerId, 0) end - -- Mission 3 start elseif MsgContains(message, "mission") then - if npcHandler:getTopic(playerId) == 0 then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 1 then npcHandler:say("The sewers need repair. You in?", npc, creature) npcHandler:setTopic(playerId, 2) - -- Mission 3 end - elseif player:getStorageValue(Storage.DarkTrails.Mission03) == 1 then + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then npcHandler:say("Elliott's keeps calling it that. It's just another job! You fixed some broken pipes and stuff? Let me check, {ok}?", npc, creature) npcHandler:setTopic(playerId, 3) end - -- Mission 3 start - sewer access elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("Good. Broken pipe and generator pieces, there's smoke evading. That's how you recognise them. See how you can fix them using your hands. Need about, oh, twenty of them at least repaired. Report to me or Jacob", npc, creature) - player:setStorageValue(Storage.Oramond.DoorAbandonedSewer, 1) - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 0) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door, 1) + end + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) + end npcHandler:setTopic(playerId, 0) end - -- Task: The Ancient Sewers elseif MsgContains(message, "ok") then if npcHandler:getTopic(playerId) == 3 then - npcHandler:say("Good. Thanks, man. That's one vote you got for helping us with this.", npc, creature) - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 21) --goto Mission 3 end + npcHandler:say("Good. Thanks, man. That's one vote you got for helping us with this. If you want to redo this task just say {abandoned sewers} to repeat it.", npc, creature) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 22) + local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) + if currentVotingPoints == -1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) + else + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) + end npcHandler:setTopic(playerId, 0) end - -- Final Mission 5 elseif MsgContains(message, "report") then - if player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then if npcHandler:getTopic(playerId) == 7 then - npcHandler:say("A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", npc, creature) - npcHandler:say("He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission06, 1) -- start Mission 6 + npcHandler:say({ + "A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", + "He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission06, 1) -- Start mission 6 npcHandler:setTopic(playerId, 0) else - npcHandler:say("You already reported this Mission, go to the next.", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("You already reported this mission, go to the next.", npc, creature) end end end + return true end npcHandler:setMessage(MESSAGE_GREET, "") -npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye!") -- Need revision +npcHandler:setMessage(MESSAGE_FAREWELL, " Yeah.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) diff --git a/data-otservbr-global/npc/elyen_ravenlock.lua b/data-otservbr-global/npc/elyen_ravenlock.lua index 51c8b0a4a92..ee0882f7066 100644 --- a/data-otservbr-global/npc/elyen_ravenlock.lua +++ b/data-otservbr-global/npc/elyen_ravenlock.lua @@ -61,43 +61,43 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission61) < 1 then + if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61) < 1 then npcHandler:say("Hello, brother. You come with a question to me, I believe?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 then npcHandler:say("And what is it you want? Do you bring news from the undead, or do you seek a dark {artefact}?", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission45, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45, 1) npcHandler:setTopic(playerId, 2) - elseif (MsgContains(message, "artefact") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission61) < 1 then + elseif (MsgContains(message, "artefact") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61) < 1 then npcHandler:say({ "The scroll piece there? The symbols look promising, but it is incomplete. ...", "It is of little use to us. But it seems to be of interest to you ...", "In exchange for the scroll piece, you must assist me with something. {Agreed}?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif (MsgContains(message, "agreed") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission61) < 1 then + elseif (MsgContains(message, "agreed") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61) < 1 then npcHandler:say({ "I would have to sing to the Dark Shrines, but I cannot. ...", "I... cannot bear Urgith's breed. Everywhere, I hear them - scrabbling, squeaking ...", "Take this bone flute and play it in front of the five Dark Shrines so that they answer with song in return. You will find them in the Gardens of Night. ...", "If you have done that, you may have the scroll piece. Now go.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission61, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61, 1) player:addItem(18932, 1) npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "mission") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission67) < 1 then + elseif MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67) < 1 then npcHandler:say("Hello, brother. You have finished the dance?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission67) < 1 then + elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67) < 1 then npcHandler:say({ "You have indeed. The shrines have sung back to you. Well done, brother. Not many men take such an interest in our art. ...", "I will take the flute back. Our bargain stands. You may take the scroll.", }, npc, creature) player:removeItem(18932, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission67, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67, 1) npcHandler:setTopic(playerId, 0) else - npcHandler:say({ "Time is money, hurry." }, npc, creature) + npcHandler:say("Time is money, hurry.", npc, creature) end return true end diff --git a/data-otservbr-global/npc/erayo.lua b/data-otservbr-global/npc/erayo.lua index 40b05205992..35c00250f40 100644 --- a/data-otservbr-global/npc/erayo.lua +++ b/data-otservbr-global/npc/erayo.lua @@ -72,7 +72,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") then - if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 156 or 152) and player:getStorageValue(Storage.OutfitQuest.AssassinFirstAddon) < 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked) == 2 then + if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 156 or 152) and player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinFirstAddon) < 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked) == 2 then npcHandler:say("Vescu gave you an assassin outfit? Haha. Noticed it lacks the head piece? You look a bit silly. Want my old head piece?", npc, creature) npcHandler:setTopic(playerId, 1) end diff --git a/data-otservbr-global/npc/eroth.lua b/data-otservbr-global/npc/eroth.lua index e8b59fa681f..c53f22d7b49 100644 --- a/data-otservbr-global/npc/eroth.lua +++ b/data-otservbr-global/npc/eroth.lua @@ -57,15 +57,15 @@ local function creatureSayCallback(npc, creature, type, message) -- 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 + if player:getStorageValue(Storage.Quest.U8_1.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 + elseif player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.Quest.U8_1.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) + player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 3) npcHandler:setTopic(playerId, 0) end -- Check if the player has accepted the mission @@ -76,7 +76,7 @@ local function creatureSayCallback(npc, creature, type, message) "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) + player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 1) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/ezebeth.lua b/data-otservbr-global/npc/ezebeth.lua index 2a3bff1ae45..471ef400b25 100644 --- a/data-otservbr-global/npc/ezebeth.lua +++ b/data-otservbr-global/npc/ezebeth.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.DarkTrails.Mission01) == -1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01) == -1 then npcHandler:say("Well, there is little where we need help beyond the normal tasks you can do for the city. However, there is one thing out of the ordinary where some {assistance} would be appreciated.", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -68,32 +68,54 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "assistance") then if npcHandler:getTopic(playerId) == 1 then - npcHandler:say(" It's nothing really important, so no one has yet found the time to look it up. It concerns the towns beggars that have started to behave {strange} lately.", npc, creature) + npcHandler:say("It's nothing really important, so no one has yet found the time to look it up. It concerns the town's beggars that have started to behave {strange} lately.", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "strange") then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("They usually know better than to show up in the streets and harass our citizens, but lately they've grown more bold or desperate or whatever. I ask you to investigate what they are up to. If necessary, you may scare them away a bit.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission01, 1) -- Mission 1 start + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01, 1) -- Mission 1 start npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "outfit") then - if player:getStorageValue(Storage.DarkTrails.Mission18) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission18) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit) < 1 then npcHandler:say("Nice work, take your outfit.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Outfit, 1) - doPlayerAddOutfit(610, 1) - doPlayerAddOutfit(618, 1) + player:addOutfit(610, 0) + player:addOutfit(618, 0) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.DarkTrails.Outfit) == 1 then + else npcHandler:say("You already have the outfit.", npc, creature) npcHandler:setTopic(playerId, 0) end + elseif MsgContains(message, "addon") then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 6 and player:getStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon2) < 1 then + npcHandler:say("Receive the second addon.", npc, creature) + player:addOutfit(610, 2) + player:addOutfit(618, 2) + player:setStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon2, 1) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 3 and player:getStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon1) < 1 then + npcHandler:say("Receive the first addon.", npc, creature) + player:addOutfit(610, 1) + player:addOutfit(618, 1) + player:setStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon1, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say({ + "We provide addons to people dedicated to our city. So the first addon is granted to someone who has voted for each of the available shortcuts and each dungeon at least once. ...", + "The second addon is granted to someone who has voted for each bossfight at least once.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) + end + end end + return true end npcHandler:setMessage(MESSAGE_GREET, "Hello! I guess you are here for a {mission}.") - npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/ferus.lua b/data-otservbr-global/npc/ferus.lua index 549005d8da9..8c166415530 100644 --- a/data-otservbr-global/npc/ferus.lua +++ b/data-otservbr-global/npc/ferus.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/gnomargery.lua b/data-otservbr-global/npc/gnomargery.lua index 85998c3288b..b8c94ab9ba7 100644 --- a/data-otservbr-global/npc/gnomargery.lua +++ b/data-otservbr-global/npc/gnomargery.lua @@ -90,50 +90,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "delivery") then - if player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == 4 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == 4 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(1589, true) - player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, -1) - player:setStorageValue(SPIKE_LOWER_PARCEL_DAILY, 86400) + player:addExperience(3500, true) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Deliver the four parcels to some of our far away outposts in the caverns.", npc, creature) end elseif MsgContains(message, "undercover") then - if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == 3 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(1589, true) - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, -1) - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_DAILY, 86400) + player:addExperience(3500, true) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Get three reports from our undercover agents posing as monsters in the caves around us.", npc, creature) end elseif MsgContains(message, "temperature") then - if player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == 1 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == 1 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(1589, true) - player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, -1) - player:setStorageValue(SPIKE_LOWER_LAVA_DAILY, 86400) + player:addExperience(3500, true) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Use the gnomish temperature measurement device to locate the hottest spot at the lava pools in the cave.", npc, creature) end elseif MsgContains(message, "kill") then - if player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(1589, true) - player:setStorageValue(SPIKE_LOWER_KILL_MAIN, -1) - player:setStorageValue(SPIKE_LOWER_KILL_DAILY, 86400) + player:addExperience(3500, true) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven drillworms.", npc, creature) end @@ -148,15 +148,15 @@ local function creatureSayCallback(npc, creature, type, message) ////PARCEL DELIVERY//// /////////////////////]] if MsgContains(message, "deliver") then - if player:getStorageValue(SPIKE_LOWER_PARCEL_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_PARCEL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == -1 then npcHandler:say("We need someone to bring four parcels to some of our far away outposts in the caverns. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "delivery" else @@ -167,7 +167,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "delivery" then if MsgContains(message, "yes") then player:addItem(19219, 4) - player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, 0) npcHandler:say({ "Gnometastic! Here are the parcels. Regrettably, the labels got lost during transport; but I guess those lonely gnomes won't mind as long as they get ANY parcel at all.", "If you lose the parcels, you'll have to get new ones. Gnomux sells all the equipment that is required for our missions." }, npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -180,15 +180,15 @@ local function creatureSayCallback(npc, creature, type, message) ////UNDERCOVER//// ////////////////]] if MsgContains(message, "undercover") then - if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_UNDERCOVER_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == -1 then npcHandler:say("Someone is needed to get three reports from our undercover agents posing as monsters in the caves around us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "undercover" else @@ -198,7 +198,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "undercover" then if MsgContains(message, "yes") then - player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, 0) npcHandler:say("Gnometastic! Get three reports from our agents. You can find them anywhere in the caves around us. Just keep looking for monsters that behave strangely and give you a wink.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -211,15 +211,15 @@ local function creatureSayCallback(npc, creature, type, message) ////TEMPERATURE///// //////////////////]] if MsgContains(message, "temperature") then - if player:getStorageValue(SPIKE_LOWER_LAVA_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_LAVA_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == -1 then npcHandler:say("Your task would be to use a gnomish temperature measurement device - short GTMD - to locate the hottest spot at the lava pools in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "temperature" else @@ -230,7 +230,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "temperature" then if MsgContains(message, "yes") then player:addItem(19206, 1) - player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, 0) npcHandler:say("Gnometastic! Find the hottest spot of the lava pools in the caves. If you lose the GTMD before you find the hot spot, you'll have to get yourself a new one. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -243,15 +243,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(SPIKE_LOWER_KILL_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_KILL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == -1 then npcHandler:say("This mission will require you to kill some drillworms for us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -261,7 +261,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(SPIKE_LOWER_KILL_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, 0) npcHandler:say("Gnometastic! You should have no trouble finding enough drillworms.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -272,6 +272,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/gnombold.lua b/data-otservbr-global/npc/gnombold.lua index 9bc16b2d293..5786bd0e2d0 100644 --- a/data-otservbr-global/npc/gnombold.lua +++ b/data-otservbr-global/npc/gnombold.lua @@ -88,50 +88,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "charges") then - if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == 2 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, -1) - player:setStorageValue(SPIKE_MIDDLE_CHARGE_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.", npc, creature) end elseif MsgContains(message, "fertilisation") then - if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == 4 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == 4 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, -1) - player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Use the fertiliser on four gardener mushroom in the caves.", npc, creature) end elseif MsgContains(message, "nests") then - if player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == 8 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == 5 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, -1) - player:setStorageValue(SPIKE_MIDDLE_NEST_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Step into the transformer and destroy eight monster nests.", npc, creature) end elseif MsgContains(message, "killing") then - if player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, -1) - player:setStorageValue(SPIKE_MIDDLE_KILL_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven crystalcrushers.", npc, creature) end @@ -142,19 +142,16 @@ local function creatureSayCallback(npc, creature, type, message) return end - --[[///////////////////// - ////GEOMANTIC CHARGES//// - ///////////////////////]] if MsgContains(message, "charges") then - if player:getStorageValue(SPIKE_MIDDLE_CHARGE_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_CHARGE_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == -1 then npcHandler:say({ "Our mission for you is to use a magnet on three different monoliths in the cave system here. After the magnet evaporates on the last charge, enter the magnetic extractor here to deliver your charge.", "If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?" }, npc, creature) talkState[playerId] = "charges" else @@ -165,7 +162,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "charges" then if MsgContains(message, "yes") then player:addItem(19207, 1) - player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 0) npcHandler:say( { "Gnometastic! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.", "If you lose the magnet you'll have to bring your own. Gnomux sells all the equipment that is required for our missions." }, npc, @@ -182,15 +179,15 @@ local function creatureSayCallback(npc, creature, type, message) ////FERTILISE//// ///////////////]] if MsgContains(message, "fertilise") then - if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == -1 then npcHandler:say("Your mission would be to seek out gardener mushrooms in the caves and use some fertiliser on them. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "fertilise" else @@ -201,7 +198,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "fertilise" then if MsgContains(message, "yes") then player:addItem(19214) - player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, 0) npcHandler:say("Gnometastic! And here is your fertiliser - use it on four gardener mushroom in the caves. If you lose the fertiliser you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -214,15 +211,15 @@ local function creatureSayCallback(npc, creature, type, message) ////DESTROY NESTS///// ////////////////////]] if MsgContains(message, "nests") then - if player:getStorageValue(SPIKE_MIDDLE_NEST_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_NEST_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == -1 then npcHandler:say("Our mission for you is to step into the gnomish transformer and then destroy eight monster nests in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "nests" else @@ -232,7 +229,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "nests" then if MsgContains(message, "yes") then - player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, 0) npcHandler:say("Gnometastic! Don't forget to step into the transformer before you go out and destroy five monster nests. If your transformation runs out, return to the transformer to get another illusion.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -245,15 +242,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(SPIKE_MIDDLE_KILL_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_KILL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == -1 then npcHandler:say("This mission will require you to kill some crystal crushers for us. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -263,7 +260,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, 0) npcHandler:say("Gnometastic! You should have no trouble to find enough crystal crushers. Killing seven of them should be enough.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -274,6 +271,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/gnome_trooper.lua b/data-otservbr-global/npc/gnome_trooper.lua index 198557c2e40..f1322b312ff 100644 --- a/data-otservbr-global/npc/gnome_trooper.lua +++ b/data-otservbr-global/npc/gnome_trooper.lua @@ -26,16 +26,6 @@ npcConfig.flags = { local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) -local response = { - [0] = "It's a pipe! What can be more relaxing for a gnome than to smoke his pipe after a day of duty at the front. At least it's a chance to do something really dangerous after all!", - [1] = "Ah, a letter from home! Oh - I had no idea she felt that way! This is most interesting!", - [2] = "It's a model of the gnomebase Alpha! For self-assembly! With toothpicks...! Yeeaah...! I guess.", - [3] = "A medal of honour! At last they saw my true worth!", -} - -if not DELIVERED_PARCELS then - DELIVERED_PARCELS = {} -end npcType.onAppear = function(npc, creature) npcHandler:onAppear(npc, creature) end @@ -56,29 +46,48 @@ npcType.onThink = function(npc, interval) npcHandler:onThink(npc, interval) end +if not DELIVERED_PARCELS then + DELIVERED_PARCELS = {} +end + +local response = { + [0] = "It's a pipe! What can be more relaxing for a gnome than to smoke his pipe after a day of duty at the front. At least it's a chance to do something really dangerous after all!", + [1] = "Ah, a letter from home! Oh - I had no idea she felt that way! This is most interesting!", + [2] = "It's a model of the gnomebase Alpha! For self-assembly! With toothpicks...! Yeeaah...! I guess.", + [3] = "A medal of honour! At last they saw my true worth!", +} + +local function initializeParcelDelivery(player) + local playerGuid = player:getGuid() + if not DELIVERED_PARCELS[playerGuid] then + DELIVERED_PARCELS[playerGuid] = {} + end + + return DELIVERED_PARCELS[playerGuid] +end + local function greetCallback(npc, creature) local player = Player(creature) - local playerId = player:getId() + local playerGuid = player:getGuid() + local deliveredParcels = initializeParcelDelivery(player) + local parcelStatus = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) - if table.contains({ -1, 4 }, player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN)) then - return false - end - if table.contains(DELIVERED_PARCELS[player:getGuid()], npc:getId()) then + if table.contains({ -1, 4 }, parcelStatus) or table.contains(deliveredParcels, npc:getId()) then return false end + + npcHandler:setMessage(MESSAGE_GREET, "Do you have something to deliver?") return true end local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) - local status = player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) - - if not DELIVERED_PARCELS[player:getGuid()] then - DELIVERED_PARCELS[player:getGuid()] = {} - end + local playerGuid = player:getGuid() + local deliveredParcels = initializeParcelDelivery(player) + local parcelStatus = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) - if MsgContains(message, "something") and not table.contains({ -1, 4 }, status) then - if table.contains(DELIVERED_PARCELS[player:getGuid()], npc:getId()) then + if MsgContains(message, "something") and not table.contains({ -1, 4 }, parcelStatus) then + if table.contains(deliveredParcels, npc:getId()) then return true end @@ -87,9 +96,9 @@ local function creatureSayCallback(npc, creature, type, message) return npcHandler:removeInteraction(npc, creature) end - npcHandler:say(response[player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN)], npc, creature) - player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, status + 1) - table.insert(DELIVERED_PARCELS[player:getGuid()], npc:getId()) + npcHandler:say(response[parcelStatus], npc, creature) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, parcelStatus + 1) + table.insert(deliveredParcels, npc:getId()) npcHandler:removeInteraction(npc, creature) end return true diff --git a/data-otservbr-global/npc/gnomilly.lua b/data-otservbr-global/npc/gnomilly.lua index 62244c6f635..5c0d217b0fb 100644 --- a/data-otservbr-global/npc/gnomilly.lua +++ b/data-otservbr-global/npc/gnomilly.lua @@ -87,50 +87,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "pacifiers") then - if player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, -1) - player:setStorageValue(SPIKE_UPPER_PACIFIER_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Take the resonance charger and use it on seven of the pacifiers in the cave.", npc, creature) end elseif MsgContains(message, "release") then - if player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == 4 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == 1 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, -1) - player:setStorageValue(SPIKE_UPPER_MOUND_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Take the spirit shovel use it on four graves in the cave system.", npc, creature) end elseif MsgContains(message, "tracking") then - if player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == 3 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, -1) - player:setStorageValue(SPIKE_UPPER_TRACK_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Take the tracking device in the caves and locate the residual spirit energy.", npc, creature) end elseif MsgContains(message, "killing") then - if player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(SPIKE_UPPER_KILL_MAIN, -1) - player:setStorageValue(SPIKE_UPPER_KILL_DAILY, 86400) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven demon skeletons.", npc, creature) end @@ -145,15 +145,15 @@ local function creatureSayCallback(npc, creature, type, message) ////GHOST PACIFIERS//// /////////////////////]] if MsgContains(message, "pacifiers") then - if player:getStorageValue(SPIKE_UPPER_PACIFIER_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_PACIFIER_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == -1 then npcHandler:say({ "We need you to recharge our ghost pacifiers. They are placed at several strategic points in the caves around us and should be easy to find. Your mission would be to charge seven of them.", "If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?" }, npc, creature) talkState[playerId] = "pacifiers" else @@ -164,7 +164,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "pacifiers" then if MsgContains(message, "yes") then player:addItem(19204, 1) - player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, 0) npcHandler:say("Gnometastic! Take this resonance charger and use it on seven of the pacifiers in the cave. If you lose the charger, you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -177,15 +177,15 @@ local function creatureSayCallback(npc, creature, type, message) ////SPIRIT RELEASE///// /////////////////////]] if MsgContains(message, "release") then - if player:getStorageValue(SPIKE_UPPER_MOUND_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_MOUND_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == -1 then npcHandler:say("Your task would be to use a spirit shovel to release some spirit's anger from graves that can be found all around here. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "release" else @@ -196,7 +196,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "release" then if MsgContains(message, "yes") then player:addItem(19203, 1) - player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, 0) npcHandler:say("Gnometastic! Take this spirit shovel and use it on four graves in the cave system. If you lose the shovel you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -209,15 +209,15 @@ local function creatureSayCallback(npc, creature, type, message) ////TRACK GHOSTS///// ///////////////////]] if MsgContains(message, "track") then - if player:getStorageValue(SPIKE_UPPER_TRACK_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_TRACK_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == -1 then npcHandler:say( { "You'd be given the highly important task to track down an enormously malevolent spiritual presence in the cave system. Use your tracking device to find out how close you are to the presence.", "Use that information to find the residual energy and use the tracker there. If you are interested, I can give you some more information about it. Are you willing to accept this mission?" }, npc, @@ -233,7 +233,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then GHOST_DETECTOR_MAP[player:getGuid()] = Position.getFreeSand() player:addItem(19205, 1) - player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, 0) npcHandler:say("Gnometastic! Use this tracking device in the caves and locate the residual spirit energy. If you lose the tracking device, you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -246,15 +246,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(SPIKE_UPPER_KILL_DAILY) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_KILL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == -1 then npcHandler:say("We need someone to reduce the steadily growing number of demon skeletons in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -264,7 +264,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(SPIKE_UPPER_KILL_MAIN, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, 0) npcHandler:say("Gnometastic! Just go out and kill them. You should find more of them than you like.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -275,6 +275,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/gnommander.lua b/data-otservbr-global/npc/gnommander.lua index cdcfe7127c0..0a53f221baa 100644 --- a/data-otservbr-global/npc/gnommander.lua +++ b/data-otservbr-global/npc/gnommander.lua @@ -171,6 +171,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Hi there! Welcome to the spike.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/hairycles.lua b/data-otservbr-global/npc/hairycles.lua index 1c407cdc383..0fbe8ead713 100644 --- a/data-otservbr-global/npc/hairycles.lua +++ b/data-otservbr-global/npc/hairycles.lua @@ -83,7 +83,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("These are dire times for our people. Problems plenty are in this times. But me people not grant trust easy. Are you willing to prove you friend of ape people?", npc, creature) npcHandler:setTopic(playerId, 1) elseif questProgress == 1 then - if player:getStorageValue(Storage.QuestChests.WhisperMoss) == 1 then + if player:getStorageValue(Storage.Quest.U7_6.WhisperMoss) == 1 then npcHandler:say("Oh, you brought me whisper moss? Good hairless ape you are! Can me take it?", npc, creature) npcHandler:setTopic(playerId, 3) else @@ -195,7 +195,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("No more missions await you right now, friend. Perhaps you want to check me offers for special friends... or shamanic powers.", npc, creature) end elseif MsgContains(message, "background") then - if questProgress == 1 and player:getStorageValue(Storage.QuestChests.WhisperMoss) ~= 1 then + if questProgress == 1 and player:getStorageValue(Storage.Quest.U7_6.WhisperMoss) ~= 1 then npcHandler:say({ "So listen, little ape was struck by plague. Hairycles not does know what plague it is. That is strange. Hairycles should know. But Hairycles learnt lots and lots ...", "Me sure to make cure so strong to drive away all plague. But to create great cure me need powerful components ...", @@ -268,7 +268,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then if not player:removeItem(4827, 1) then npcHandler:say("Stupid, you no have the moss me need. Go get it. It's somewhere in dworc lair. If you lost it, they might restocked it meanwhile. If you need to hear background of all again, ask Hairycles for {background}.", npc, creature) - player:setStorageValue(Storage.QuestChests.WhisperMoss, -1) + player:setStorageValue(Storage.Quest.U7_6.WhisperMoss, -1) return true end @@ -321,7 +321,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 7 then if MsgContains(message, "yes") then if not player:removeItem(4831, 1) then - if player:getStorageValue(Storage.QuestChests.OldParchment) == 1 then + if player:getStorageValue(Storage.Quest.U7_6.OldParchment) == 1 then npcHandler:say("That's bad news. If you lost it, only way to get other is to kill holy serpents. But you can't go there so you must ask adventurers who can.", npc, creature) else npcHandler:say("No! That not scroll me looking for. Silly hairless ape you are. Go to village of lizards and get it there on your own!", npc, creature) diff --git a/data-otservbr-global/npc/hugo.lua b/data-otservbr-global/npc/hugo.lua index 16f5f468897..ba7b657f92b 100644 --- a/data-otservbr-global/npc/hugo.lua +++ b/data-otservbr-global/npc/hugo.lua @@ -115,17 +115,17 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "uniforms") then - if player:getStorageValue(Storage.Postman.Mission06) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 1 then npcHandler:say("A new uniform for the post officers? I am sorry but my dog ate the last dress pattern we used. You need to supply us with a new dress pattern.", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "dress pattern") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("It was ... wonderous beyond wildest imaginations! I have no clue where Kevin Postner got it from. Better ask him.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 2) - elseif player:getStorageValue(Storage.Postman.Mission06) == 11 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 2) + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 11 then npcHandler:say("By the gods of fashion! Didn't it do that I fed the last dress pattern to my poor dog? Will this mocking of all which is taste and fashion never stop?? Ok, ok, you will get those ugly, stinking uniforms and now get lost, fashion terrorist.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 12) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 12) end npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "outfit") then diff --git a/data-otservbr-global/npc/iptar-sin.lua b/data-otservbr-global/npc/iptar-sin.lua index e206cac3f87..3b81dafb140 100644 --- a/data-otservbr-global/npc/iptar-sin.lua +++ b/data-otservbr-global/npc/iptar-sin.lua @@ -105,11 +105,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Quentin) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Quentin, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/isimov.lua b/data-otservbr-global/npc/isimov.lua index 7e7d57061c7..2b82718c586 100644 --- a/data-otservbr-global/npc/isimov.lua +++ b/data-otservbr-global/npc/isimov.lua @@ -68,11 +68,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Isimov) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Isimov) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Isimov, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Isimov, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/jack.lua b/data-otservbr-global/npc/jack.lua index c92bdf9491c..2dbc1833d5f 100644 --- a/data-otservbr-global/npc/jack.lua +++ b/data-otservbr-global/npc/jack.lua @@ -63,15 +63,15 @@ local function greetCallback(npc, creature, message) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 7 then + if player:getStorageValue(Storage.Quest.U8_7.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! 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 + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then npcHandler:setMessage(MESSAGE_GREET, { "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 + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 9) + elseif player:getStorageValue(Storage.Quest.U8_7.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 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.") @@ -89,25 +89,25 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "spectulus") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 1 then npcHandler:say("Gesundheit! Are you alright? Did you... want to tell me something by that?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then 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 - 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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 4) end end elseif MsgContains(message, "furniture") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then 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 + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then if npcHandler:getTopic(playerId) == 0 then npcHandler:say("WHAT?? No way, I ask you again - you DID tell me the TRUTH here... right?", npc, creature) npcHandler:setTopic(playerId, 5) @@ -117,8 +117,8 @@ local function creatureSayCallback(npc, creature, type, message) "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) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.LastMissionState, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 11) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.LastMissionState, 1) npcHandler:setTopic(playerId, 0) end end @@ -135,33 +135,33 @@ local function creatureSayCallback(npc, creature, type, message) "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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 2) end - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then if npcHandler:getTopic(playerId) == 0 then 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 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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 11) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.LastMissionState, 2) npcHandler:setTopic(playerId, 0) end 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) < 0 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 7 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) < 0 then npcHandler:say({ "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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue, 1) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then 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 diff --git a/data-otservbr-global/npc/jacob.lua b/data-otservbr-global/npc/jacob.lua index e649a6773c0..6b420783e7d 100644 --- a/data-otservbr-global/npc/jacob.lua +++ b/data-otservbr-global/npc/jacob.lua @@ -54,64 +54,84 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - -- Mission 3 start if MsgContains(message, "abandoned sewers") then - if player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) < 21 then - npcHandler:say("You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", npc, creature) - npcHandler:say("But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", npc, creature) - -- Mission 3 end - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 21 then - npcHandler:say("Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", npc, creature) - npcHandler:say("I hereby grant you the permission to enter the abandoned part of the sewers. Take care, man! ...", npc, creature) - npcHandler:say("If you find something interesting, come back to talk about the {abandoned sewers}.", npc, creature) - npcHandler:setTopic(playerId, 7) - player:setStorageValue(Storage.DarkTrails.Mission04, 1) - player:setStorageValue(Storage.Oramond.DoorAbandonedSewer, 1) - elseif player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then npcHandler:say("I'm glad to see you back alive and healthy. Did you find anything interesting that you want to {report}?", npc, creature) npcHandler:setTopic(playerId, 7) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then + npcHandler:say({ + "You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", + "But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) == 22 then + npcHandler:say({ + "Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", + "I hereby grant you the permission to enter the abandoned part of the sewers. Take care, man! ...", + "If you find something interesting, come back to talk about the {abandoned sewers}.", + }, npc, creature) + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04) < 1 then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04, 1) + end + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, -1) + npcHandler:setTopic(playerId, 0) end - -- Mission 3 start elseif MsgContains(message, "mission") then - if npcHandler:getTopic(playerId) == 0 then + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 1 then npcHandler:say("The sewers need repair. You in?", npc, creature) npcHandler:setTopic(playerId, 2) - -- Mission 3 end - elseif player:getStorageValue(Storage.DarkTrails.Mission03) == 1 then + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then npcHandler:say("Elliott's keeps calling it that. It's just another job! You fixed some broken pipes and stuff? Let me check, {ok}?", npc, creature) npcHandler:setTopic(playerId, 3) + elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) == 22 then + npcHandler:say("If you want to redo this task just say {abandoned sewers} to repeat it.", npc, creature) + npcHandler:setTopic(playerId, 0) end - -- Mission 3 start - sewer access elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("Good. Broken pipe and generator pieces, there's smoke evading. That's how you recognise them. See how you can fix them using your hands. Need about, oh, twenty of them at least repaired. Report to me or Jacob", npc, creature) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door, 1) + end + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) + end npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.Oramond.AbandonedSewer, 1) - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 0) end - -- Task: The Ancient Sewers elseif MsgContains(message, "ok") then if npcHandler:getTopic(playerId) == 3 then npcHandler:say("Good. Thanks, man. That's one vote you got for helping us with this.", npc, creature) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 22) + local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) + if currentVotingPoints == -1 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) + else + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) + end npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 21) -- Mission 3 end end - -- Final mission 5 elseif MsgContains(message, "report") then - if player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then if npcHandler:getTopic(playerId) == 7 then - npcHandler:say("A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", npc, creature) - npcHandler:say("He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission06, 1) -- Start mission 6 + npcHandler:say({ + "A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", + "He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission06, 1) -- Start mission 6 npcHandler:setTopic(playerId, 0) else npcHandler:say("You already reported this mission, go to the next.", npc, creature) end end end + return true end +npcHandler:setMessage(MESSAGE_GREET, " Hi.") +npcHandler:setMessage(MESSAGE_FAREWELL, " See ya.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/jondrin.lua b/data-otservbr-global/npc/jondrin.lua index 1e9a99c1070..7533ac2b1c4 100644 --- a/data-otservbr-global/npc/jondrin.lua +++ b/data-otservbr-global/npc/jondrin.lua @@ -54,25 +54,26 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if MsgContains(message, "necrometer") then - --[[if player:getStorageValue(Storage.Oramond.TaskProbing == 1) then - --for this mission is needed script of the npc Doubleday]] - npcHandler:say("A necrometer? Have you any idea how rare and expensive a necrometer is? There is no way I could justify giving a necrometer to an inexperienced adventurer. Hm, although ... if you weren't inexperienced that would be a different matter. ...", npc, creature) - npcHandler:say("Did you do any measuring task for Doubleday lately?", npc, creature) + if MsgContains(message, "necrometer") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10) < 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.OramondTaskProbing) == 1 then + npcHandler:say({ + "A necrometer? Have you any idea how rare and expensive a necrometer is? There is no way I could justify giving a necrometer to an inexperienced adventurer. Hm, although ... if you weren't inexperienced that would be a different matter. ...", + "Did you do any measuring task for Doubleday lately?", + }, npc, creature) npcHandler:setTopic(playerId, 1) - --end - elseif MsgContains(message, "yes") then - if (npcHandler:getTopic(playerId) == 1) and player:getStorageValue(Storage.DarkTrails.Mission09) == 1 then - npcHandler:say("Indeed I heard you did a good job out there. I guess that means I can hand you one of our necrometers. Handle it with care", npc, creature) - npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.DarkTrails.Mission10, 1) - player:addItem(21124, 1) - else - npcHandler:say("You already got the Necrometer.", npc, creature) - end + elseif player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10) >= 1 then + npcHandler:say("You already got the Necrometer.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then + npcHandler:say("Indeed I heard you did a good job out there. I guess that means I can hand you one of our necrometers. Handle it with care.", npc, creature) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10, 1) + player:addItem(21124, 1) + npcHandler:setTopic(playerId, 0) end + return true end + +npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/jorge.lua b/data-otservbr-global/npc/jorge.lua index 1fa43c74c62..94653f72374 100644 --- a/data-otservbr-global/npc/jorge.lua +++ b/data-otservbr-global/npc/jorge.lua @@ -49,45 +49,54 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function onAddFocus(npc, creature) + local playerId = creature:getId() +end + +local function onReleaseFocus(npc, creature) + local playerId = creature:getId() +end + local items = { [1] = { name = "Abacus", id = 19151 }, [2] = { name = "Assassin Doll", id = 28897 }, - [3] = { name = "Bag of Oriental Spices", id = 10817 }, - [4] = { name = "Bookworm Doll", id = 18343 }, - [5] = { name = "Cateroides Doll", id = 22151 }, - [6] = { name = "Doll of Durin the Almighty", id = 14764 }, - [7] = { name = "Dragon Eye", id = 22027 }, - [8] = { name = "Dragon Goblet", id = 31265 }, - [9] = { name = "Draken Doll", id = 12043 }, - [10] = { name = "Encyclopedia", id = 8149 }, - [11] = { name = "Friendship Amulet", id = 19153 }, - [12] = { name = "Frozen Heart", id = 19156 }, - [13] = { name = "Golden Falcon", id = 28896 }, - [14] = { name = "Golden Newspaper", id = 8153 }, - [15] = { name = "Hand Puppets", id = 9189 }, - [16] = { name = "Imortus", id = 12811 }, - [17] = { name = "Jade Amulet", id = 31268 }, - [18] = { name = "Key of Numerous Locks", id = 19152 }, - [19] = { name = "Loremaster Doll", id = 31267 }, - [20] = { name = "Mathmaster Shield", id = 14760 }, - [21] = { name = "Medusa Skull", id = 14762 }, - [22] = { name = "Music Box", id = 12045 }, - [23] = { name = "Noble Sword", id = 16276 }, - [24] = { name = "Norsemal Doll", id = 19150 }, - [25] = { name = "Old Radio", id = 12813 }, - [26] = { name = "Orcs Jaw Shredder", id = 19155 }, - [27] = { name = "Pigeon Trophy", id = 31266 }, - [28] = { name = "Phoenix Statue", id = 22026 }, - [29] = { name = "The Mexcalibur", id = 19154 }, - [30] = { name = "TibiaHispano Emblem", id = 25980 }, - [31] = { name = "Goromaphone", id = 34210 }, + [3] = { name = "Bag of Oriental Spices", id = 23682 }, + [4] = { name = "Bookworm Doll", id = 28895 }, + [5] = { name = "Citizen Doll", id = 43511 }, + [6] = { name = "Crimson Doll", id = 25981 }, + [7] = { name = "Doll of Durin the Almighty", id = 23679 }, + [8] = { name = "Dragon Eye", id = 22027 }, + [9] = { name = "Dragon Goblet", id = 31265 }, + [10] = { name = "Draken Doll", id = 25979 }, + [11] = { name = "Emblem", id = 25980 }, + [12] = { name = "Encyclopedia", id = 23678 }, + [13] = { name = "Friendship Amulet", id = 19153 }, + [14] = { name = "Frozen Heart", id = 19156 }, + [15] = { name = "Golden Falcon", id = 28896 }, + [16] = { name = "Golden Newspaper", id = 23681 }, + [17] = { name = "Goromaphone", id = 34210 }, + [18] = { name = "Hand Puppets", id = 23676 }, + [19] = { name = "Imortus", id = 23683 }, + [20] = { name = "Jade Amulet", id = 31268 }, + [21] = { name = "Key of Numerous Locks", id = 19152 }, + [22] = { name = "Little Adventurer Doll", id = 37058 }, + [23] = { name = "Loremaster Doll", id = 31267 }, + [24] = { name = "Lucky Clover Amulet", id = 37059 }, + [25] = { name = "Mathmaster Shield", id = 25982 }, + [26] = { name = "Medusa Skull", id = 23680 }, + [27] = { name = "Music Box", id = 23677 }, + [28] = { name = "Noble Sword", id = 22028 }, + [29] = { name = "Norseman Doll", id = 19150 }, + [30] = { name = "Old Radio", id = 28894 }, + [31] = { name = "Orc's Jaw Shredder", id = 19155 }, + [32] = { name = "Phoenix Statue", id = 22026 }, + [33] = { name = "Pigeon Trophy", id = 31266 }, + [34] = { name = "Shield of Destiny", id = 43517 }, + [35] = { name = "Shield of Endless Search", id = 37060 }, + [36] = { name = "The Mexcalibur", id = 19154 }, + [37] = { name = "Tibiora's Box", id = 43510 }, } -local function greetCallback(npc, creature) - local playerId = creature:getId() - return true -end - local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -96,34 +105,42 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if message then + -- Implementing the "souvenir" message interaction + if MsgContains(message, "souvenir") then + npcHandler:say({ + "In this category I can offer you a Norseman doll, an abacus, a key of numerous locks, a friendship amulet, a mexcalibur sword, an orc shredder, a frozen heart, a phoenix statue, a dragon eye and a noble sword. Or: ...", + "A hand puppet, a music box, an encyclopedia, a Durin doll, a medusa skull, a newspaper, a bag of spices or an Exhiti imortus. ...", + "A mathmaster shield, a draken doll, an emblem, a crimson doll, an old radio, a bookworm doll, a golden falcon and an assassin doll. ...", + "A dragon goblet, a pigeon trophy, a loremaster doll and a jade amulet. ...", + "All listed souvenirs are at 20 silver raid tokens each. Which one of them do you want?", + }, npc, creature) + npcHandler:setTopic(playerId, 1) + return true + end + + -- Checking if the player responded with an item name after "souvenir" + if npcHandler:getTopic(playerId) == 1 then for i = 1, #items do if MsgContains(message, items[i].name) then if getPlayerItemCount(creature, 19083) >= 20 then doPlayerRemoveItem(creature, 19083, 20) doPlayerAddItem(creature, items[i].id, 1) - selfSay("You just swapped 20 silver raid tokens for 1 " .. getItemName(items[i].name) .. ".", npc, creature) + npcHandler:say("You just swapped 20 silver raid tokens for 1 " .. items[i].name .. ".", npc, creature) else - selfSay("You need 20 silver raid tokens.", npc, creature) + npcHandler:say("I'm sorry, I need at least 20 silver tokens for that. Please come back when you have them.", npc, creature) end + npcHandler:setTopic(playerId, 0) -- Reset topic after processing + return true end end end - return true -end -local function onAddFocus(npc, creature) - local playerId = creature:getId() -end - -local function onReleaseFocus(npc, creature) - local playerId = creature:getId() + return true end npcHandler:setCallback(CALLBACK_SET_INTERACTION, onAddFocus) npcHandler:setCallback(CALLBACK_REMOVE_INTERACTION, onReleaseFocus) -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/kasmir.lua b/data-otservbr-global/npc/kasmir.lua index b08d52c09a9..d8caa64f2e5 100644 --- a/data-otservbr-global/npc/kasmir.lua +++ b/data-otservbr-global/npc/kasmir.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Kasmir) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kasmir) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Kasmir, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kasmir, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/kazzan.lua b/data-otservbr-global/npc/kazzan.lua index 797bf28fe67..78a93d4f979 100644 --- a/data-otservbr-global/npc/kazzan.lua +++ b/data-otservbr-global/npc/kazzan.lua @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) < 1 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.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:setTopic(playerId, 1) @@ -97,14 +97,14 @@ local function creatureSayCallback(npc, creature, type, message) "Very good. I hope you are able to convince one of the fractions to stand on our side. If you haven't done yet, you should first go and look for old Melchior in Ankrahmun. ...", "He knows many things about the djinn race and he may have some hints for you.", }, npc, creature) - if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, 1) -- Entregando - elseif player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_1.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) - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) player:addItem(3035, 20) end diff --git a/data-otservbr-global/npc/kevin.lua b/data-otservbr-global/npc/kevin.lua index 41686524673..aadf4e8f56f 100644 --- a/data-otservbr-global/npc/kevin.lua +++ b/data-otservbr-global/npc/kevin.lua @@ -69,114 +69,114 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Postman.Mission01) < 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) < 1 then npcHandler:say("You are not a member of our guild yet! We have high standards for our members. To rise in our guild is a difficult but rewarding task. Are you interested in joining?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Postman.Mission01) == 5 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 5 then npcHandler:say("So you have finally made it! I did not think that you would have it in you ... However: are you ready for another assignment?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.Postman.Mission02) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 2 then npcHandler:say("Excellent, you got it fixed! This will teach this mailbox a lesson indeed! Are you interested in another assignment?", npc, creature) - player:setStorageValue(Storage.Postman.Mission02, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 3) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.Postman.Mission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 2 then npcHandler:say("You truly got him? Quite impressive. You are a very promising candidate! I think I have another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Postman.Mission04) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 1 then npcHandler:say("Do you bring all bones for our officers' safety fund at once?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.Postman.Mission05) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05) == 3 then npcHandler:say("Splendid, I knew we could trust you. I would like to ask for your help in another matter. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.Postman.Mission07) == 8 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) == 8 then npcHandler:say("Once more you have impressed me! Are you willing to do another job?", npc, creature) npcHandler:setTopic(playerId, 21) - elseif player:getStorageValue(Storage.Postman.Mission06) >= 1 and player:getStorageValue(Storage.Postman.Mission06) < 10 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) < 10 then npcHandler:say("First you need to complete your current mission.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission06) == 12 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 12 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 13) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 13) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission06) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 10 then npcHandler:say("Fine, fine. I think that should do it. Tell Hugo that we order those uniforms. The completed dress pattern will soon arrive in Venore. Report to me when you have talked to him.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 11) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 11) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission08) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 2 then npcHandler:say("So Waldo is dead? This is grave news indeed. Did you recover his posthorn?", npc, creature) npcHandler:setTopic(playerId, 23) - elseif player:getStorageValue(Storage.Postman.Mission09) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 3 then npcHandler:say("You did it? I hope you did not catch a flu in the cold! Anyway, there's another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 26) - elseif player:getStorageValue(Storage.Postman.Mission10) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 2 then npcHandler:say("You have delivered that letter? You are a true postofficer. All over the land bards shallpraise your name. There are no missions for you left right now.", npc, creature) - player:setStorageValue(Storage.Postman.Mission10, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 3) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 5 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 then npcHandler:say("There are no missions for you left right now. You already have the title of Archpostman.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then npcHandler:say("There are no missions for you left right now. But you are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 27) - elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Postman.Rank) == 4 or player:getStorageValue(Storage.Postman.Rank) == 3 and player:getStorageValue(Storage.Postman.Mission09) == 0 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 or player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 0 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Postman.Mission07) < 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) < 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then npcHandler:say("You have made it! We have enough bones for the fund! You remind me of myself when I was young! Interested in another mission?", npc, creature) npcHandler:setTopic(playerId, 15) - elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then npcHandler:say("You have made it! We have enough bones for the fund! You remind me of myself when I was young! Interested in another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission03) == 3 and player:getStorageValue(Storage.Postman.Mission04) == 0 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 0 then npcHandler:say("You truly got him? Quite impressive. You are a very promising candidate! I think I have another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Postman.Rank) == 1 and player:getStorageValue(Storage.Postman.Mission03) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 3 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Postman.Mission02) == 3 and player:getStorageValue(Storage.Postman.Rank) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 10) end elseif MsgContains(message, "dress pattern") then - if player:getStorageValue(Storage.Postman.Mission06) == 2 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 2 then npcHandler:say("Oh yes, where did we get that from ...? Let's see, first ask the great technomancer in Kazordoon for the technical details. Return here afterwards.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 3) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission06) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 4 then npcHandler:say("The mail with Talphion's instructions just arived. I remember we asked Queen Eloise of Carlin for the perfect colours. Go there, ask her about the UNIFORMS and report back here.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 5) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 5) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission06) == 6 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 6 then npcHandler:say("The queen has sent me the samples we needed. The next part is tricky. We need theuniforms to emanate some odor that dogs hate.The dog with the best 'taste' in that field is Noodles,the dog of King Tibianus. Do you understand so far?", npc, creature) npcHandler:setTopic(playerId, 18) - elseif player:getStorageValue(Storage.Postman.Mission06) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 10 then npcHandler:say("Fine, fine. I think that should do it. Tell Hugo that we order those uniforms. The completed dress pattern will soon arrive in Venore. Report to me when you have talked to him.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 11) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 11) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "advancement") then - if player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 20) - elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 24) - elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 27) end @@ -201,32 +201,32 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 7) elseif npcHandler:getTopic(playerId) == 7 then npcHandler:say("Ok, remember: the Tibian mail service puts trust in you! Don't fail and report back soon. Just tell me about your {mission}.", npc, creature) - player:setStorageValue(Storage.Postman.Mission01, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 then npcHandler:say("I am glad to hear that. One of our mailboxes was reported to be jammed. It is located on the so called 'mountain' on theisle Folda. Get a crowbar and fix the mailbox. Report about your mission when you have done so.", npc, creature) - player:setStorageValue(Storage.Postman.Mission01, 6) - player:setStorageValue(Storage.Postman.Mission02, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 6) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then npcHandler:say("For your noble deeds I grant you the title Assistant Postofficer. All Postofficers will charge you less money from now on. After every second mission ask me for an ADVANCEMENT. Your next task will be a bit more challenging. Do you feel ready for it?", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 1) npcHandler:setTopic(playerId, 10) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("I need you to deliver a bill to the stage magician David Brassacres. He's hiding from his creditors somewhere in Venore. It's likely you will have to trick him somehow to reveal his identity. Report back when you delivered this bill.", npc, creature) - player:setStorageValue(Storage.Postman.Mission03, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 1) player:addItem(3216, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then npcHandler:say("Ok, listen: we have some serious trouble with agressive dogs lately. We have accumulated some bones as a sort of pacifier but we need more. Collect 20 bones like the one in my room to the left and report here.", npc, creature) - player:setStorageValue(Storage.Postman.Mission03, 3) - player:setStorageValue(Storage.Postman.Mission04, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 13 then if getPlayerBones(creature) >= 20 then doPlayerRemoveBones(creature) npcHandler:say("You have collected all the 20 bones needed. Excellent! Now let's talk about further missions if you are interested.", npc, creature) - player:setStorageValue(Storage.Postman.Mission04, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04, 2) npcHandler:setTopic(playerId, 0) else npcHandler:setTopic(playerId, 0) @@ -234,64 +234,64 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say("I grant you the title of postman. You are now a full member of our guild. Here have your own officers hat and wear it with pride.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 2) player:addItem(3576, 1) npcHandler:setTopic(playerId, 15) elseif npcHandler:getTopic(playerId) == 15 then npcHandler:say("Since I am convinced I can trust you, this time you must deliver a valuable present to Dermot on Fibula. Do NOT open it!!! You will find the present behind the door here on the lower right side of this room.", npc, creature) - player:setStorageValue(Storage.Postman.Mission05, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 16 then npcHandler:say("Ok. We need a new set of uniforms, and only the best will do for us. Please travel to Venore and negotiate with Hugo Chief acontract for new uniforms.", npc, creature) - player:setStorageValue(Storage.Postman.Mission05, 4) - player:setStorageValue(Storage.Postman.Mission06, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 18 then npcHandler:say("Good. Go there and find out what taste he dislikes most: mouldy cheese, a piece of fur or abananaskin. Tell him to SNIFF, then the object. Show him the object and ask 'Do you like that?'.DONT let the guards know what you are doing.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 7) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 7) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 19 then npcHandler:say("Good, so listen. Hugo Chief informed me that he needs the measurements of our postofficers. Go and bring me the measurements of Ben, Lokur, Dove, Liane, Chrystal and Olrik.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 20 then npcHandler:say("From now on it shall be known that you are a grand postman. You are now a privilegedmember until the end of days. Most captains around the world have an agreement with our guild to transport our privileged members, like you, for less gold.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 3) npcHandler:setTopic(playerId, 19) elseif npcHandler:getTopic(playerId) == 21 then npcHandler:say("Ok but your next assignment might be dangerous. Our Courier Waldo has been missing for a while. I must assume he is dead. Can you follow me so far?", npc, creature) npcHandler:setTopic(playerId, 22) elseif npcHandler:getTopic(playerId) == 22 then npcHandler:say("Find out about his whereabouts and retrieve him or at least his posthorn. He was looking for a new underground passage that is rumoured to be found underneath the troll-infested Mountain east of Thais.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, 9) - player:setStorageValue(Storage.Postman.Mission08, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, 9) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 23 then if player:removeItem(3219, 1) then npcHandler:say("Thank you. We will honour this. Your next mission will be a very special one. Good thing you are a special person as well. Are you ready?", npc, creature) - player:setStorageValue(Storage.Postman.Mission08, 3) - player:setStorageValue(Storage.Postman.Mission09, 0) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 0) npcHandler:setTopic(playerId, 28) end elseif npcHandler:getTopic(playerId) == 24 then npcHandler:say("From now on you are a grand postman for special operations. You are an honoured member of our guild and earned the privilege of your own post horn. Here, take it.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 4) player:addItem(3252, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 25 then npcHandler:say("So listen well. Behind the lower left door you will find a bag. The letters in the bag are for none other than Santa Claus! Deliver them to his house on the isle of Vega, {use} thebag on his mailbox and report back here.", npc, creature) - player:setStorageValue(Storage.Postman.Mission09, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 26 then npcHandler:say("Excellent. Here is a letter for you to deliver. Well, to be honest, no one else volunteered. It's a letter from the mother of Markwin, the king of Mintwallin. Deliver that letter to him, but note that you will not be welcome there.", npc, creature) - player:setStorageValue(Storage.Postman.Mission09, 4) - player:setStorageValue(Storage.Postman.Mission10, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 1) player:addItem(3220, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 27 then npcHandler:say("I grant you the title of Archpostman. You are a legend in our guild. As privilege of your newly aquired status you are allowed to make use of certain mailboxes in dangerous areas. Just look out for them and you'll see.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 5) - player:setStorageValue(Storage.Postman.Door, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 5) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Door, 1) player:addAchievement("Archpostman") npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 28 then diff --git a/data-otservbr-global/npc/kjesse.lua b/data-otservbr-global/npc/kjesse.lua index 609cf542d9d..84a5f6378a5 100644 --- a/data-otservbr-global/npc/kjesse.lua +++ b/data-otservbr-global/npc/kjesse.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Kjesse) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kjesse) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Kjesse, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kjesse, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/kroox.lua b/data-otservbr-global/npc/kroox.lua index c8adea58c72..ac0acc773de 100644 --- a/data-otservbr-global/npc/kroox.lua +++ b/data-otservbr-global/npc/kroox.lua @@ -67,10 +67,10 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackDoor, 1) end elseif message == "lokurs measurements" then - if player:getStorageValue(Storage.Postman.Mission07) >= 7 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 7 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox) ~= 1 then npcHandler:say("Hm, well I guess its ok to tell you ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsKroox, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox, 1) else npcHandler:say("...", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/liane.lua b/data-otservbr-global/npc/liane.lua index b483de917ae..330b9a8615d 100644 --- a/data-otservbr-global/npc/liane.lua +++ b/data-otservbr-global/npc/liane.lua @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsLiane) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsLiane) ~= 1 then npcHandler:say("I have more urgent problem to attend then that. Those hawks are hunting my carrier pigeons. Bring me 12 arrows and I'll see if I have the time for this nonsense. Do you have 12 arrows with you? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -79,8 +79,8 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3447, 12) then npcHandler:say("Great! Now I'll teach them a lesson ... For those measurements ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsLiane, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsLiane, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Oh, you don't have it.", npc, creature) diff --git a/data-otservbr-global/npc/lokur.lua b/data-otservbr-global/npc/lokur.lua index 59fc7ed0f7c..88e710aa066 100644 --- a/data-otservbr-global/npc/lokur.lua +++ b/data-otservbr-global/npc/lokur.lua @@ -95,9 +95,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("No then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 6 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 6 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox) ~= 1 then npcHandler:say("Come on, I have no clue what they are. Better ask my armorer Kroox for such nonsense.Go and ask him for good ol' Lokurs measurements, he'll know.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) else npcHandler:say("...", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/lorietta.lua b/data-otservbr-global/npc/lorietta.lua index aee99cca788..afd1393dd59 100644 --- a/data-otservbr-global/npc/lorietta.lua +++ b/data-otservbr-global/npc/lorietta.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Lorietta) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Lorietta) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Lorietta, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Lorietta, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/maealil.lua b/data-otservbr-global/npc/maealil.lua index f53dfd767a8..03974a9ce64 100644 --- a/data-otservbr-global/npc/maealil.lua +++ b/data-otservbr-global/npc/maealil.lua @@ -64,11 +64,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Maealil) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Maealil) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Maealil, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Maealil, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/maeryn.lua b/data-otservbr-global/npc/maeryn.lua index 93086feb347..009641f6e3b 100644 --- a/data-otservbr-global/npc/maeryn.lua +++ b/data-otservbr-global/npc/maeryn.lua @@ -151,7 +151,7 @@ local function creatureSayCallback(npc, creature, type, message) end if npcHandler:getTopic(playerId) == 2 then --if (Set storage if player can enchant helmet(need Grim Vale quest)) then - player:setStorageValue(Storage.Grimvale.WereHelmetEnchant, vocations[helmet]) + player:setStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant, vocations[helmet]) npcHandler:say("So this is your choice. If you want to change it, you will have to come to me again.", npc, creature) --else --npcHandler:say("Message when player do not have quest.", npc, creature) @@ -164,7 +164,7 @@ local function creatureSayCallback(npc, creature, type, message) return false else --if (Set storage if player can enchant helmet(need Grim Vale quest)) then - player:setStorageValue(Storage.Grimvale.WereHelmetEnchant, vocations[knightChoice[playerId]][weapontype]) + player:setStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant, vocations[knightChoice[playerId]][weapontype]) npcHandler:say("So this is your choice. If you want to change it, you will have to come to me again.", npc, creature) --else --npcHandler:say("Message when player do not have quest.", npc, creature) diff --git a/data-otservbr-global/npc/markwin.lua b/data-otservbr-global/npc/markwin.lua index c30dd0242f3..0a27b3ac6bc 100644 --- a/data-otservbr-global/npc/markwin.lua +++ b/data-otservbr-global/npc/markwin.lua @@ -86,7 +86,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "letter") then - if player:getStorageValue(Storage.Postman.Mission10) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 1 then if player:getItemCount(3220) > 0 then npcHandler:say("A letter from my Moohmy?? Do you have a letter from my Moohmy to me?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Uhm, well thank you, hornless being.", npc, creature) - player:setStorageValue(Storage.Postman.Mission10, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 2) player:removeItem(3220, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/marvin.lua b/data-otservbr-global/npc/marvin.lua index f5cd7fe16c2..98d4a5cfdc4 100644 --- a/data-otservbr-global/npc/marvin.lua +++ b/data-otservbr-global/npc/marvin.lua @@ -55,14 +55,14 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "funding") then - if player:setStorageValue(Storage.DarkTrails.Mission07) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission07) == 1 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 1 then npcHandler:say({ "So far you earned x votes. Each single vote can be spent on a different topic or you're also able to cast all your votes on one voting. ...", "Well in the topic b you have the possibility to vote for the funding of the {archives}, import of bug {milk} or street {repairs}.", }, npc, creature) npcHandler:setTopic(playerId, 1) else - npcHandler:say("You cant vote yet.", npc, creature) + npcHandler:say("You can't vote yet.", npc, creature) end elseif MsgContains(message, "archives") then if npcHandler:getTopic(playerId) == 1 then @@ -71,18 +71,25 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "1") then if npcHandler:getTopic(playerId) == 2 then - npcHandler:say("Did I get that right: You want to cast 1 of your votes on funding the {archives?}", npc, creature) + npcHandler:say("Did I get that right: You want to cast 1 of your votes on funding the {archives}?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 3 then - player:setStorageValue(Storage.DarkTrails.Mission08, 1) + local currentVotes = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) + if currentVotes > 0 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotes - 1) + end + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission08, 1) npcHandler:say("Thanks, you successfully cast your vote. Feel free to continue gathering votes by helping the city! Farewell.", npc, creature) npcHandler:setTopic(playerId, 0) end end + return true end + +npcHandler:setMessage(MESSAGE_GREET, "Ah, you come just in time for the special voting about the most recent {funding} project. I guess you want to participate in it.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/mazarius.lua b/data-otservbr-global/npc/mazarius.lua index a44e01e893f..2fee7b05b14 100644 --- a/data-otservbr-global/npc/mazarius.lua +++ b/data-otservbr-global/npc/mazarius.lua @@ -61,28 +61,35 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "brings") then npcHandler:say("Ah, you have heard about my search for experienced help. And indeed your reputation for solving certain {problems} has preceded you.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "problems") then - npcHandler:say(" My problems are, so to say, dire news for the whole world. I don't want to confuse you with overly complicated and lengthy stories, so do you want to hear the {long} version or the {short}?", npc, creature) + npcHandler:say("My problems are, so to say, dire news for the whole world. I don't want to confuse you with overly complicated and lengthy stories, so do you want to hear the {long} version or the {short}?", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "long") then - npcHandler:say("He obviously had taken an interest to the topic of ascension, and I came into possession of some of his early writings. ...You have to know I'm a scholar of some renown. In the course of my latest studies about ascension, I stumbled upon disturbing facts about the person of the all to well known Ferumbras, the fiendish. ...", npc, creature) - npcHandler:say("This, combined with investigation and divination, bit by bit led to the conclusion that all that Ferumbras has done in the past may be part of a cunning plan. ...", npc, creature) - npcHandler:say("Considering his writings and the books he based them upon, it became clear that Ferumbras is planning his ascension to godlike status. ...", npc, creature) - npcHandler:say("All of his attacks and defeats only served one purpose: to become an integral part of the people's knowledge, fears and beliefs. ...", npc, creature) - npcHandler:say("He actually used this as an energy source, and combined it with some sources of power which might not all be of our own world. ...", npc, creature) - npcHandler:say("He uses this energy to increasingly empower himself and will eventually be prepared to take the final step to transform himself into a godlike being. ...", npc, creature) - npcHandler:say("With the knowledge what to look for, I acquired expensive but powerful artefacts to scry the world for the expected power signature - and indeed I made contact. ...", npc, creature) - npcHandler:say("To my horror I had to recognise that Ferumbras had already made significant progress, and his final bid for ascension is imminent! ...", npc, creature) - npcHandler:say("His power levels are already too high for there to be any hope of stopping him with conventional means. ...", npc, creature) - npcHandler:say("But not all is lost yet. During my studies about godhood, I learned that the dark Zathroth himself had created a weapon so powerful that it could actually slay a god. ...", npc, creature) - npcHandler:say("Yet even he deemed this so-called '{godbreaker}' too dangerous, and split it into seven parts. These were at some point entrusted to his powerful minions, known as the Ruthless Seven. ...", npc, creature) - npcHandler:say("Ancient, forbidden texts hinted at a hellish place where the seven built deadly dungeons, and placed some of their most fearsome and terrible minions as guards, before they sealed the place off. ...", npc, creature) - npcHandler:say("I'm confident that I can prepare a matching ritual that will breach their protection and allow someone to enter their realm; but I'm in no way suited to handle the horrors to be encountered there. ...", npc, creature) - npcHandler:say("Therefore I have to ask you, if you are willing to retrieve the parts of the godbreaker, and face the threat of the ascending Ferumbras?", npc, creature) + npcHandler:say({ + "He obviously had taken an interest to the topic of ascension, and I came into possession of some of his early writings. ...You have to know I'm a scholar of some renown. In the course of my latest studies about ascension, I stumbled upon disturbing facts about the person of the all too well known Ferumbras, the fiendish. ...", + "This, combined with investigation and divination, bit by bit led to the conclusion that all that Ferumbras has done in the past may be part of a cunning plan. ...", + "Considering his writings and the books he based them upon, it became clear that Ferumbras is planning his ascension to godlike status. ...", + "All of his attacks and defeats only served one purpose: to become an integral part of the people's knowledge, fears and beliefs. ...", + "He actually used this as an energy source, and combined it with some sources of power which might not all be of our own world. ...", + "He uses this energy to increasingly empower himself and will eventually be prepared to take the final step to transform himself into a godlike being. ...", + "With the knowledge what to look for, I acquired expensive but powerful artefacts to scry the world for the expected power signature - and indeed I made contact. ...", + "To my horror I had to recognise that Ferumbras had already made significant progress, and his final bid for ascension is imminent! ...", + "His power levels are already too high for there to be any hope of stopping him with conventional means. ...", + "But not all is lost yet. During my studies about godhood, I learned that the dark Zathroth himself had created a weapon so powerful that it could actually slay a god. ...", + "Yet even he deemed this so-called '{godbreaker}' too dangerous, and split it into seven parts. These were at some point entrusted to his powerful minions, known as the Ruthless Seven. ...", + "Ancient, forbidden texts hinted at a hellish place where the seven built deadly dungeons, and placed some of their most fearsome and terrible minions as guards, before they sealed the place off. ...", + "I'm confident that I can prepare a matching ritual that will breach their protection and allow someone to enter their realm; but I'm in no way suited to handle the horrors to be encountered there. ...", + "Therefore I have to ask you, if you are willing to retrieve the parts of the godbreaker, and face the threat of the ascending Ferumbras?", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "short") then - npcHandler:say("My studies indicate that without all doubt Ferumbras the fiendish is in the process of accumulating nearly godlike powers. We have to stop him. ...", npc, creature) - npcHandler:say("Therefore I need you to enter a hellish dimension and acquire the parts of a weapon, the {godbreaker}, powerful enough to stop him once and for all. Are you willing to help me in this dire mission?", npc, creature) + npcHandler:say({ + "My studies indicate that without all doubt Ferumbras the fiendish is in the process of accumulating nearly godlike powers. We have to stop him.", + "Therefore I need you to enter a hellish dimension and acquire the parts of a weapon, the {godbreaker}, powerful enough to stop him once and for all. Are you willing to help me in this dire mission?", + }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.FerumbrasAscension.Access) < 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Access) < 1 then npcHandler:say("Good!, but I need 30 {demonic essences} to exchange with the demonic messenger for a ticket for you to enter the Abodes of Torments.", npc, creature) elseif MsgContains(message, "demonic essence") or MsgContains(message, "essence") then npcHandler:say("Do you have 30 demonic essences to offer to the demonic messenger?", npc, creature) @@ -91,59 +98,92 @@ local function creatureSayCallback(npc, creature, type, message) if player:removeItem(6499, 30) then npcHandler:say("Excellent! This will empower possibilty to create a breach is enough to let you pass into that hellish hiding place. ...", npc, creature) player:addItem(22182, 1) - player:setStorageValue(Storage.FerumbrasAscension.Access, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Access, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor, 1) + npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have the demonic essences, back here when you get it.", npc, creature) - npcHandler:removeInteraction(npc, creature) + npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "godbreaker") then - npcHandler:say("For a long time, I thought the godbreaker to be some apocryphal myth. But apparently others had learned about the godbreaker in the aeons past and lusted for its power. ...", npc, creature) - npcHandler:say("They had gathered hint after hint - until, ultimately, they were squashed by the Seven or their minions; which only made the leads that hinted at them all the more probable. ...", npc, creature) - npcHandler:say("What Zathroth hoped to accomplish with the creation of such a weapon can only be subject to speculation. Assumedly he already had slain Tibiasula, so the godbreaker might have been even more powerful, more absolute. ...", npc, creature) - npcHandler:say("However, it has to be assumed that in the end the sheer power of his creation scared Zathroth, who had to fear the weapon could one day be used against him. So he disassembled it. ...", npc, creature) - npcHandler:say("He kept the parts hidden and guarded, and if the resources can be trusted and my interpretation is right, moved them again and again, never satisfied with a hiding place. In the end he entrusted the parts to the {Ruthless Seven}. ...", npc, creature) - npcHandler:say("Knowing that they would never, ever allow one of their own to come in possession of all parts. Since then, the parts have been hidden in a {demi-plane} shared by the Seven.", npc, creature) - npcHandler:say("Well, I need 30 {demonic essences} to change for a passage to you can access", npc, creature) + npcHandler:say({ + "For a long time, I thought the godbreaker to be some apocryphal myth. But apparently others had learned about the godbreaker in the aeons past and lusted for its power. ...", + "They had gathered hint after hint - until, ultimately, they were squashed by the Seven or their minions; which only made the leads that hinted at them all the more probable. ...", + "What Zathroth hoped to accomplish with the creation of such a weapon can only be subject to speculation. Assumedly he already had slain Tibiasula, so the godbreaker might have been even more powerful, more absolute. ...", + "However, it has to be assumed that in the end the sheer power of his creation scared Zathroth, who had to fear the weapon could one day be used against him. So he disassembled it. ...", + "He kept the parts hidden and guarded, and if the resources can be trusted and my interpretation is right, moved them again and again, never satisfied with a hiding place. In the end he entrusted the parts to the {Ruthless Seven}. ...", + "Knowing that they would never, ever allow one of their own to come in possession of all parts. Since then, the parts have been hidden in a {demi-plane} shared by the Seven.", + "Well, I need 30 {demonic essences} to exchange for a passage so you can access.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "Ruthless Seven") or MsgContains(message, "ruthless seven") then npcHandler:say("Given the internal power plays amongst the Seven, they are the ideal keepers for individual parts of an powerful artefact. Not one of them would allow his compatriots to hold such a power, and neither would trust the other.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "demi-plane") then - npcHandler:say("It is a place, so to say, not completely of this world. It is separate of, yet strongly connected to, our own world. I would imagine it is quite limited in size and its laws of physics and magic should be roughly the same as ours. ...", npc, creature) - npcHandler:say("Being home to a host of demons for a while, I expect it to be an hostile and dangerous environment.", npc, creature) + npcHandler:say({ + "It is a place, so to say, not completely of this world. It is separate of, yet strongly connected to, our own world. I would imagine it is quite limited in size and its laws of physics and magic should be roughly the same as ours. ...", + "Being home to a host of demons for a while, I expect it to be a hostile and dangerous environment.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "ascension") then - npcHandler:say("Ascension is a fascinating topic that dates back to efforts and philosophies of some of the most ancient, and mostly extinct, races which fought in the godwars. ...", npc, creature) - npcHandler:say("Probably born out of desperation, they extensively researched ways to acquire godhood themselves. ...", npc, creature) - npcHandler:say("Some of them at least even met with moderate success. But the process is complicated at best, and may vary from race to race or even from one individual to another. ...", npc, creature) - npcHandler:say("The theories differ vastly and waxed and waned in popularity over the centuries if not aeons. Even today and in human society there are a number of obscure ascension cults. ...", npc, creature) - npcHandler:say("Some of them claim that humans are most suitable for ascension because they already own a bit of divinity through Banor's godly spark.", npc, creature) + npcHandler:say({ + "Ascension is a fascinating topic that dates back to efforts and philosophies of some of the most ancient, and mostly extinct, races which fought in the godwars. ...", + "Probably born out of desperation, they extensively researched ways to acquire godhood themselves. ...", + "Some of them at least even met with moderate success. But the process is complicated at best, and may vary from race to race or even from one individual to another. ...", + "The theories differ vastly and waxed and waned in popularity over the centuries if not aeons. Even today and in human society there are a number of obscure ascension cults. ...", + "Some of them claim that humans are most suitable for ascension because they already own a bit of divinity through Banor's godly spark.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "ferumbras") then - npcHandler:say("Although already powerful in his own right, it is obvious that his ultimate goal seems to be the ascension to godly powers. ...", npc, creature) - npcHandler:say("His whole existence seems to be centred on becoming a name that strikes fear into the heart of men and to become a persistent figure in the minds of humanity. ...", npc, creature) - npcHandler:say("This gives him a hold in reality and a kind of mould to fill with his power and conscience. It's also obvious that this kind of belief of the people alone won't be enough to empower him sufficiently. ...", npc, creature) - npcHandler:say("Therefore he has to tap into other, probably even more sinister power sources. I can't tell what these sources are, but my scrying revealed that he has reached massive amounts of power. He has probably been infusing himself since years. ...", npc, creature) - npcHandler:say("By now he is apparently reaching the end circle of his ascension and could make his final move any day.", npc, creature) + npcHandler:say({ + "Although already powerful in his own right, it is obvious that his ultimate goal seems to be the ascension to godly powers. ...", + "His whole existence seems to be centred on becoming a name that strikes fear into the heart of men and to become a persistent figure in the minds of humanity. ...", + "This gives him a hold in reality and a kind of mould to fill with his power and conscience. It's also obvious that this kind of belief of the people alone won't be enough to empower him sufficiently. ...", + "Therefore he has to tap into other, probably even more sinister power sources. I can't tell what these sources are, but my scrying revealed that he has reached massive amounts of power. He has probably been infusing himself since years. ...", + "By now he is apparently reaching the end circle of his ascension and could make his final move any day.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "bozarn") then npcHandler:say("Ah, a good man and a competent aid.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "darashia") then npcHandler:say("I like the quietness and the climate. And admittedly it helped my studies not to be constantly disturbed by petitioners.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "thais") then npcHandler:say("Thais has become a melting pot of some source. Yet whatever you melt, if the ingredients are corrupted, the outcome is always flawed.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "carlin") then npcHandler:say("Instead of banding together and starting to change something, they and Thais keep wasting resources in hostilities.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "kazordoon") then - npcHandler:say("The dwarves are leftovers from a time long gone by. They have outlived their usefulness to the gods and seem to have come to terms with that. ...", npc, creature) - npcHandler:say("They are as unchanging as rock and no greatness awaits them any more. They missed their chance, if they ever had any.", npc, creature) + npcHandler:say({ + "The dwarves are leftovers from a time long gone by. They have outlived their usefulness to the gods and seem to have come to terms with that. ...", + "They are as unchanging as rock and no greatness awaits them any more. They missed their chance, if they ever had any.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "ab'dendriel") then - npcHandler:say("The elves are like lost children. Their potential might be great, but they lack focus and dedication to truly improve. If their myths are true, some of the more early elves might have accomplished ascension. ...", npc, creature) - npcHandler:say("Yet even if hints strongly suggest those stories are true, the sheer inaction of those assumedly ascended beings is disturbing. Perhaps what those legendary elves achieved was something completely different.", npc, creature) + npcHandler:say({ + "The elves are like lost children. Their potential might be great, but they lack focus and dedication to truly improve. If their myths are true, some of the more early elves might have accomplished ascension. ...", + "Yet even if hints strongly suggest those stories are true, the sheer inaction of those assumedly ascended beings is disturbing. Perhaps what those legendary elves achieved was something completely different.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "edron") then npcHandler:say("Edron has become as stagnant as the teachings in its academy. No new idea has been thought there for decades. The whole Edron is an example for what happens when humanity has become fat and lazy.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "demons") then - npcHandler:say("With all their powers and vast magic knowledge they are still more pawns than anything else. Given their resources, ascension might seem within reach. ...", npc, creature) - npcHandler:say("The absence of any ascendant demon might prove that they are no true beings at all and literally damned to be stuck in their accursed forms.", npc, creature) + npcHandler:say({ + "With all their powers and vast magic knowledge they are still more pawns than anything else. Given their resources, ascension might seem within reach. ...", + "The absence of any ascendant demon might prove that they are no true beings at all and literally damned to be stuck in their accursed forms.", + }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "venore") then npcHandler:say("An almost laughable greed is persistent in that city. At least this makes knowledge and materials conveniently available to those who can match their prizes.", npc, creature) + npcHandler:setTopic(playerId, 0) else npcHandler:say("What?!", npc, creature) + npcHandler:setTopic(playerId, 0) end end npcHandler:setMessage(MESSAGE_GREET, "Greetings, dear visitor. Please tell me what {brings} you here, to my humble adobe.") diff --git a/data-otservbr-global/npc/mother_of_jack.lua b/data-otservbr-global/npc/mother_of_jack.lua index 3f7d693cb56..cc428dee566 100644 --- a/data-otservbr-global/npc/mother_of_jack.lua +++ b/data-otservbr-global/npc/mother_of_jack.lua @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "jack") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 5 then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Mother) < 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother) < 1 then 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 @@ -90,7 +90,7 @@ local function creatureSayCallback(npc, creature, type, message) "JAAAAACK!", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Mother, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother, 1) end end return true diff --git a/data-otservbr-global/npc/muhad.lua b/data-otservbr-global/npc/muhad.lua index f55754cbc94..c4ec365f14a 100644 --- a/data-otservbr-global/npc/muhad.lua +++ b/data-otservbr-global/npc/muhad.lua @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) + local AritosTask = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) -- Check if the message contains "arito" if MsgContains(message, "arito") then @@ -96,8 +96,8 @@ local function creatureSayCallback(npc, creature, type, message) "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) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 2) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTaskDoor, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/muriel.lua b/data-otservbr-global/npc/muriel.lua index df5d4770ebb..8017528a681 100644 --- a/data-otservbr-global/npc/muriel.lua +++ b/data-otservbr-global/npc/muriel.lua @@ -64,20 +64,20 @@ local function creatureSayCallback(npc, creature, type, message) return true end - if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == -1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == -1 then npcHandler:say({ "Indeed, there is something you can do for me. You must know I am researching for a new spell against the undead. ...", "To achieve that I need a desecrated bone. There is a cursed bone pit somewhere in the dungeons north of Thais where the dead never rest. ...", "Find that pit, dig for a well-preserved human skeleton and conserve a sample in a special container which you receive from me. Are you going to help me?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == 1 then npcHandler:say({ "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) - elseif player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == 2 then - player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 3) + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == 2 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 3) if player:removeItem(131, 1) then player:addItem(6299, 1) npcHandler:say("Excellent! Now I can try to put my theoretical thoughts into practice and find a cure for the symptoms of undead. Here, take this for your efforts.", npc, creature) @@ -97,7 +97,7 @@ local function creatureSayCallback(npc, creature, type, message) "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) player:addItem(4852, 1) - player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 1) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then diff --git a/data-otservbr-global/npc/ninev.lua b/data-otservbr-global/npc/ninev.lua index b888f005330..f20f3d5b0de 100644 --- a/data-otservbr-global/npc/ninev.lua +++ b/data-otservbr-global/npc/ninev.lua @@ -105,11 +105,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Quentin) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Quentin, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/ninos.lua b/data-otservbr-global/npc/ninos.lua index d55c55939d8..f659681e466 100644 --- a/data-otservbr-global/npc/ninos.lua +++ b/data-otservbr-global/npc/ninos.lua @@ -68,10 +68,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "measurements") then local player = Player(creature) - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsBenjamin) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin) ~= 1 then npcHandler:say("Oh they don't change that much since in the old days as... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsBenjamin, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/noodles.lua b/data-otservbr-global/npc/noodles.lua index 64c8ab591b7..56fc3c545a0 100644 --- a/data-otservbr-global/npc/noodles.lua +++ b/data-otservbr-global/npc/noodles.lua @@ -64,21 +64,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "banana skin") then - if player:getStorageValue(Storage.Postman.Mission06) == 7 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 7 then if player:getItemCount(3104) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 1) end end elseif MsgContains(message, "dirty fur") then - if player:getStorageValue(Storage.Postman.Mission06) == 8 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 8 then if player:getItemCount(3105) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 2) end end elseif MsgContains(message, "mouldy cheese") then - if player:getStorageValue(Storage.Postman.Mission06) == 9 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 9 then if player:getItemCount(3120) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 3) @@ -87,15 +87,15 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "like") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Woof!", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 8) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 8) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Woof!", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 9) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 9) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Meeep! Grrrrr! ", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 10) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 10) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/oblivion.lua b/data-otservbr-global/npc/oblivion.lua index 56794dbd97a..20ea208173c 100644 --- a/data-otservbr-global/npc/oblivion.lua +++ b/data-otservbr-global/npc/oblivion.lua @@ -62,44 +62,44 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission45) < 1 then + if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45) < 1 then npcHandler:say("Lost. Hidden. The keys are shadow names. Find them, they will talk to me and reveal what is hidden. Will you go on that quest?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) == 1 then npcHandler:say({ "Then into the vampire crypts, deep down, you must go. ...", "There... three graves where the shadows swirl, unseen. The first one: name the colour of the silent gong. Then ...", "The second: the name that is silent now in the halls of Darkstone ...", "The third: the lost beauty of Dunesea. It must be remembered, the shadows command it. Go now.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission45, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45, 1) npcHandler:setTopic(playerId, 0) - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then npcHandler:say("Yes. Have you gone there and found what you sought?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then npcHandler:say("Tell me. Begin with the colour.", npc, creature) npcHandler:setTopic(playerId, 3) - elseif (MsgContains(message, "bronze")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "bronze")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then npcHandler:say("Yes. The shadows say this is true. The beauty of House Dunesea, name it.", npc, creature) npcHandler:setTopic(playerId, 4) - elseif (MsgContains(message, "floating")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "floating")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then npcHandler:say("The floating gardens. Too beautiful to lie asleep in the memory of men. Yes. The name that is no more in Darkstone?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif (MsgContains(message, "Takesha Antishu")) and npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "Takesha Antishu")) and npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then npcHandler:say({ "Ah, the Lady of Darkstone. You have done well to remember her name. ...", "Now, the shadows say the thing you seek lies next to Akab, the Quarrelsome. ...", "No coal is burned in his honour. Find his resting place and dig near it. Now go.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission49, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49, 1) npcHandler:setTopic(playerId, 0) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage(MESSAGE_GREET, "Be greeted.") +npcHandler:setMessage(MESSAGE_GREET, "A shadow preceded you. You wish?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/olrik.lua b/data-otservbr-global/npc/olrik.lua index 42886e71318..d900e7841f2 100644 --- a/data-otservbr-global/npc/olrik.lua +++ b/data-otservbr-global/npc/olrik.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsOlrik) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsOlrik) ~= 1 then npcHandler:say("My measurements? Listen, lets make that a bit more exciting ... No, no, not what you think! I mean let's gamble. I will roll a dice. If I roll a 6 you win and I'll tell you what you need to know, else I win and get 5 gold. Deal? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -74,8 +74,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok, here we go ... " .. number .. "! You lose! Try again.", npc, creature) else npcHandler:say("Ok, here we go ... " .. number .. "! You have won! How lucky you are! So listen ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsOlrik, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsOlrik, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/omrabas.lua b/data-otservbr-global/npc/omrabas.lua index 378b0dc2793..ffb093cd4c1 100644 --- a/data-otservbr-global/npc/omrabas.lua +++ b/data-otservbr-global/npc/omrabas.lua @@ -63,52 +63,52 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.GravediggerOfDrefia.QuestStart) < 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.QuestStart) < 1 then npcHandler:say("Hmm. You could be of assistance, I presume. I need several body parts. I will reward you adequately. Interested?", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.QuestStart, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.QuestStart, 1) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission01) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission02) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission01) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission02) < 1 then npcHandler:say("Ah hello, young friend! Did you bring me two ghoul snacks as requested?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission02) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission03) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission02) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03) < 1 then npcHandler:say("Ah, young friend, I found a solution! Find me two {demonic skeletal hands}. That should do it. Now run along! Ask me for {mission} when you're done.", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission03, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission03) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission04) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission04) < 1 then npcHandler:say("Ah hello again! You look as if you could, er, lend me a hand or two? Yes?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission04) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission05) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission05, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission04) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05, 1) npcHandler:say({ "I need my heart back. I know where they have hidden it. Too afraid to destroy my beating heart, hah! ...", "It is in a dusty amphora in a sealed mass grave in the downmost cellar of my ancient home. The ruins lie to the north at the beach. ...", "Crash the amphoras to find my heart, and bring it to me.", }, npc, creature) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission07) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07) < 1 then npcHandler:say({ "Yes? You have it? You what? Not in the amphoras? You picked it off someone else?!? ...", "Well, the important thing is that you have it. Let's see if it's still in good shape. {Give} it to me.", }, npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission07) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission08) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission08, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08, 1) npcHandler:say({ "I will need brains - don't laugh! Ahem. I will need a stimulated brain, to be precise. ...", "Use two half-eaten brains with the Brain Heater Machine in the Necromancer halls and bring me the fused, stimulated brain. Now go!", }, npc, creature) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission09) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission10) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission10) < 1 then npcHandler:say("Yes, yes, hello. Tell me if you lost something. If not, do you have that stimulated brain with you?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission10) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission11) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission11, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission10) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission11) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission11, 1) player:addItem(19085, 1) npcHandler:say({ "Now that you have shown you've got the brains, I need you to show initiative. ...", "I will need something that can be adequately used as intestines. Something alive. Stuff it into this storage flask and return it to me!", }, npc, creature) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission12) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission13) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13) < 1 then npcHandler:say("Hello, hello. Let's come to the point - did you find me some intestines?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission13) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission14) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14) < 1 then npcHandler:say({ "Good. As you may have gathered, the body parts you brought need to be assembled to form a whole body. ...", "This will happen through a necromantic ritual that we - or rather, you - now have to prepare. ...", @@ -117,93 +117,93 @@ local function creatureSayCallback(npc, creature, type, message) "But first things first. Are you ready to {undertake} the hallowing of the five altars?", }, npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission15) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission16) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission15) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16) < 1 then npcHandler:say("Ah hello! Well done there, I felt the old powers settling down. Now, {ready} to hallow the next altar?", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission16, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) < 1 then npcHandler:say({ "I expected no less. Next is the Bonemarrow Altar, where the Dark Lord feasts upon the hallowed bones of...err. ...", "Ahem. Just take a yellowed bone or big bone, and hallow it - you don't know how? ...", "Huh. To HALLOW a yellowed bone, use it with one of the hallowed bonepiles in the Gardens Of Night. There are always bones around there - or were, in my days. ...", "Then, place the hallowed bone on the firebasin of the Bonemarrow Altar so the Dark Lord can consume it and grants us his power. Return to me after that.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission17, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission18) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission18) < 1 then npcHandler:say({ "Are you still here? Come on, let's not laze about, go to the Gardens of Night - where? ...", "East of the Necromancer Halls, you can't miss it, just look for a lot of dark and white sand, dried trees, and priestesses! ...", "Or got a {problem} with finding bones? Hah!", }, npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission20) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission21) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission20) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21) < 1 then npcHandler:say({ "Ah, welcome, welcome! I felt that one! The Dark Lord is pleased with the gift you brought, so now we can proceed with everything as planned. ...", "If it had gone wrong though, he would have had your guts for gart... er... well, here you are, so - ready to get some {blood} flowing?", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission21, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission22) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22) < 1 then npcHandler:say({ "Yes, I said blood. Important ingredient in necromantic rituals, usually. ...", "You need to spill some vials of blood tincture for this task. Probably means killing blood priests to get those vials. Ready to do this?", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission22, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission25) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission26) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission26, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission25) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission26) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission26, 1) npcHandler:say({ "Ah, it is invigorating to fell the dark flows, rushing through Drefia, once again! Capital. This has earned you a reward. ...", "Now, the next mission awaits, {yes}?", }, npc, creature) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission29) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission30) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission29) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission30) < 1 then npcHandler:say({ "Ah, finally. Exceptional! Don't you feel the earth awakening to our call? No? Oh. ...", "Anyway, you succeeded in hallowing the Fireglass Altar! Only one altar remains to be hallowed! Shall we {proceed}?", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission30, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission33) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission34) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission34, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission30, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission33) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34, 1) npcHandler:say({ "Yes! YES! I have felt that! The altars are alive again! Well done! ...", "We are close now. Only one important thing remains: the incantation itself. We need the {scroll} for that.", }, npc, creature) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) < 1 then npcHandler:say("Yes? Do you have the {scroll} piece? ", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) < 1 then npcHandler:say({ "Hah, developed a taste for it, have you? I believe the next scroll piece was hidden somewhere, my old friend being of a somewhat distrustful nature. ...", "The scent may not be lost, though - ask a shadow pupil if he can help - but be careful. ...", "Those shadow pupils are - strange. Try to find one who will answer and not kill you!", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission44, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) < 1 then npcHandler:say("Ah, hello! I take it you have the next scroll piece for me, {yes}?", npc, creature) npcHandler:setTopic(playerId, 12) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) < 1 then npcHandler:say({ "Good! As you can imagine, I had a scroll piece, too. I hid it in my old quarters, northwest of the library. ...", "The door is magically sealed. Use this copper key with it to get inside. ...", "Beneath one of the chests is a secret stash, under a loose stone tile. The scroll piece should be inside. Off you go.", }, npc, creature) player:addItem(19173, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission52, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) < 1 then npcHandler:say("Hello - what? You have the {scroll} piece, you say?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) < 1 then player:addItem(19148, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission59, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59, 1) npcHandler:say({ "Hahah, eager for it, I like that! ...", "One piece stayed in the hands of a beautiful priestess. ...", "As they never throw anything away that looks like an incantation - you get my drift. Find out where they still keep it! ...", "Oh, one more thing! They only talk to you when you look like a fellow summoner. It's dangerous to go without a cape. Use this.", }, npc, creature) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission65) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65) < 1 then npcHandler:say("Hello, young apprentice. Do you have that {scroll} piece from the priestess?", npc, creature) player:addItem(19148, 1) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission65) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission66) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66) < 1 then npcHandler:say({ "That's the spirit! Speaking of which, you will have to look for a White Shade ...", "That's a ghost, in case you don't know. Goes by name of... Zarifan, if I recall correctly. ...", @@ -213,71 +213,68 @@ local function creatureSayCallback(npc, creature, type, message) "Anyway, say those three words - don't make me repeat them - and the old softie will tell you where the scroll is. Pathetic.", }, npc, creature) player:addItem(19148, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission66, 1) - --elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) < 1 then - --npcHandler:say("Welcome, welcome! Finally! The last scroll piece.... you do have it, haven't you?", npc, creature) - --npcHandler:setTopic(playerId, 15) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission71) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73) < 1 then npcHandler:say("Don't keep me waiting. The last scroll piece - were you able to {restore} it?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) == 1 then --and player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission76) < 1 then npcHandler:say({ "It failed! IT FAILED! WHY? What have you done! This must be your fault! ...", "You... did... that was a recipe for chicken soup! No wonder the scroll failed! Now... all is lost ...", " I never want to see you again! You and your dirty gravedigger hands! Take this, you ungrateful, useless, imbecile... human! ...", "Now... get out! And never, ever, dare come back! You ruined EVERYTHING!", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission73, 2) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission76, 1) player:addItem(19136, 1) end elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.QuestStart) == 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission01, 1) + if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.QuestStart) == 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission01, 1) npcHandler:say({ "Very sensible of you. I will pay you handsomely for your help. ...", "All you have to do is fetch diverse fresh body parts and then prepare the resurrection ritual. Nothing out of the ordinary. ...", "First, I need two arms. Ghouls usually carry some as a snack. Two ghoul snacks should not be hard to get! Return when you have them.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission01) == 1 then + elseif npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission01) == 1 then if player:removeItem(11467, 2) then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission02, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission02, 1) npcHandler:say("Splendid! What? They're half gnawed! There are no hands! Hrmmm. Let me think of a solution. Ask me for a new {mission}.", npc, creature) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have two ghoul snacks.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission03) == 1 then + elseif npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03) == 1 then if player:removeItem(9647, 2) then npcHandler:say("Yes. Those will be adequate. Talk to me again if you want to continue with your next {mission}.", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission04, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission04, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have two demonic skeletal hands.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) == 1 then + elseif npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) == 1 then if player:removeItem(19077, 1) then npcHandler:say("Ah... Very good. Just say the word when you are ready for the next {mission}.", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission07, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my heart.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission09) == 1 then + elseif npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09) == 1 then if player:removeItem(19078, 1) then npcHandler:say("Ah... Very good. Just say the word when you are ready for the next {mission}.", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission10, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission10, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have the brain.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 6 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission12) == 1 then + elseif npcHandler:getTopic(playerId) == 6 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12) == 1 then if player:removeItem(19086, 1) then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission13, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13, 1) npcHandler:say({ "Ah... interesting. A snake? Not bad, not bad at all. ...", "Right. Now, we need to waken the old powers through ritual. Let me know when you are ready for this {mission}.", @@ -287,67 +284,67 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my intestine.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission22) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission23) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission23) < 1 then npcHandler:say({ "Ah, I knew you were a sturdy fellow! Necromancer material if ever I saw one! ...", "Well then, the next task is to anoint the Bloodgong Altar. This will animate the dark flows we need for the ritual. ...", "You need to spill a vial of blood tincture on each of the four sacrifical stones of the altar in order to anoint them. ...", "Then, toll the Bloodgong north of the sacrificial stones to set the dark flows going. Return to me after that.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission23, 1) - elseif npcHandler:getTopic(playerId) == 9 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission26) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission27) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission23, 1) + elseif npcHandler:getTopic(playerId) == 9 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission26) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission27) < 1 then npcHandler:say({ "Excellent. To bind the earthly powers, we, I mean you, must worship at the Fireglass Altar. ...", "This means scattering sacred ashes from the Ember Chamber on the sacrificial stones of the Fireglass Altar. ...", "To gather the sacred ashes, you have to use magic chalk with the Shadow Fire in the Ember Chamber. ...", "Gather the resulting ashes from the Shadow Hearth, and scatter them on the Fireglass Altar's sacrificial stones. Then return here.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission27, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission27, 1) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 10 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission35, 1) + elseif npcHandler:getTopic(playerId) == 10 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35, 1) npcHandler:say({ "Superb! You won't regret this. I will reward you beyond your wildest dreams! ...", "I know that one of my former friends joined the blood priests later on. He made it quite high before he was ritually killed. ...", "Go find a blood priest you can talk to. Ask him, but subtly. And never tell anyone what the scroll does!", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 11 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) == 1 then + elseif npcHandler:getTopic(playerId) == 11 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) == 1 then if player:removeItem(18933, 1) then npcHandler:say("This is it! This is it! Well done, well done! And now, on to the {next} scroll piece, {yes}?", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission43, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) < 1 then npcHandler:say({ "Hah, developed a taste for it, have you? I believe the next scroll piece was hidden somewhere, my old friend being of a somewhat distrustful nature. ...", "The scent may not be lost, though - ask a shadow pupil if he can help - but be careful. ...", "Those shadow pupils are - strange. Try to find one who will answer and not kill you!", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission44, 1) - elseif npcHandler:getTopic(playerId) == 12 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) == 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44, 1) + elseif npcHandler:getTopic(playerId) == 12 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) == 1 then if player:removeItem(18933, 1) then npcHandler:say("Indeed it is! The second scroll piece! Splendid! Here you go - for your trouble. And now, on to the {next} scroll piece, {yes}? ", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission51, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) < 1 then npcHandler:say({ "Good! As you can imagine, I had a scroll piece, too. I hid it in my old quarters, northwest of the library. ...", "The door is magically sealed. Use this copper key with it to get inside. ...", "Beneath one of the chests is a secret stash, under a loose stone tile. The scroll piece should be inside. Off you go.", }, npc, creature) player:addItem(19173, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission52, 1) - elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52, 1) + elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) < 1 then if player:removeItem(18933, 1) then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission58, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58, 1) npcHandler:say({ "Oh, praise the Dark Lord! It is my scroll piece! Give it here! You can have this instead. ...", "Ahh, that feels GOOD. Now, only two pieces left to hunt down! On to the {next} scroll piece, yes?", @@ -357,27 +354,28 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) < 1 then player:addItem(19148, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission59, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59, 1) npcHandler:say({ "Hahah, eager for it, I like that! ...", "One piece stayed in the hands of a beautiful priestess. ...", "As they never throw anything away that looks like an incantation - you get my drift. Find out where they still keep it! ...", "Oh, one more thing! They only talk to you when you look like a fellow summoner. It's dangerous to go without a cape. Use this.", }, npc, creature) - elseif npcHandler:getTopic(playerId) == 15 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) < 1 then + elseif npcHandler:getTopic(playerId) == 15 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69) < 1 then if player:removeItem(18933, 1) then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission69, 1) npcHandler:say({ "Ahhh, capital, capital. Good girl for keeping it for me. I'll take back my cape now, thank you. ...", "Now - the final part of the scroll! Ready to go retrieve it?", }, npc, creature) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69, 1) + npcHandler:setTopic(playerId, 17) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission71) < 1 then + elseif npcHandler:getTopic(playerId) == 17 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission70) < 1 then npcHandler:say({ "That's the spirit! Speaking of which, you will have to look for a White Shade ...", "That's a ghost, in case you don't know. Goes by name of... Zarifan, if I recall correctly. ...", @@ -386,12 +384,10 @@ local function creatureSayCallback(npc, creature, type, message) "'Friendship lives forever.' Silly, really. Untrue, as well. ...", "Anyway, say those three words - don't make me repeat them - and the old softie will tell you where the scroll is. Pathetic.", }, npc, creature) - player:addItem(19148, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission71, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission69, 1) - elseif npcHandler:getTopic(playerId) == 15 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission72) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission70, 1) + elseif npcHandler:getTopic(playerId) == 18 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) < 1 then if player:removeItem(18933, 1) then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission72, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72, 1) npcHandler:say({ "I am so excited! Finally, we - wait. What is this? That... is not the complete scroll piece. ...", "I don't care what you say! This is a disaster! We need a complete scr - wait. I have an idea. ...", @@ -402,59 +398,58 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 17 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) < 1 then + elseif npcHandler:getTopic(playerId) == 19 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74) < 1 then npcHandler:say({ "Then let's go. Take my skull and the incantation scroll to the working station in the fiveserrated room ...", "Where the lava flows and the southern legs of the room meet. Place the Skull on the sacrificial stone and use the scroll ...", "AND I shall be made whole, and YOU shall be RICH!", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission74, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74, 1) player:addItem(18934, 1) player:addItem(19160, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "demonic skeletal hands") or MsgContains(message, "demonic skeletal hand") then npcHandler:say("What? Hack some off from a demon skeleton, of course! Now get moving.", npc, creature) - elseif MsgContains(message, "give") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) == 1 then + elseif MsgContains(message, "give") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) == 1 then if player:removeItem(19077, 1) then npcHandler:say("Ah... Very good. Just say the word when you are ready for the next {mission}.", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission07, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my heart.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "undertake") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission13) == 1 and npcHandler:getTopic(playerId) == 7 then + elseif MsgContains(message, "undertake") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13) == 1 and npcHandler:getTopic(playerId) == 7 then npcHandler:say({ "Good! Let's not waste time. The first altar you must hallow is the Dragonsoul Altar, at the eastern side of the room. ...", "To hallow it, dig out three dragon tears and place them on the altar to appease the dark powers. ...", "What? Oh, you'll find some dragon tears near dragon skulls... where? ...", "In the Dragonbone Cemetery, OBVIOUSLY! Must I explain EVERYTHING to you? Now go!", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission14, 1) - player:addItem(19084, 3) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14, 1) npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "ready") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) < 1 then + elseif MsgContains(message, "ready") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) < 1 then npcHandler:say({ "I expected no less. Next is the Bonemarrow Altar, where the Dark Lord feasts upon the hallowed bones of...err. ...", "Ahem. Just take a yellowed bone or big bone, and hallow it - you don't know how? ...", "Huh. To HALLOW a yellowed bone, use it with one of the hallowed bonepiles in the Gardens Of Night. There are always bones around there - or were, in my days. ...", "Then, place the hallowed bone on the firebasin of the Bonemarrow Altar so the Dark Lord can consume it and grants us his power. Return to me after that.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission17, 1) - elseif MsgContains(message, "problem") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) == 1 and npcHandler:getTopic(playerId) == 8 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17, 1) + elseif MsgContains(message, "problem") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) == 1 and npcHandler:getTopic(playerId) == 8 then npcHandler:say("What? No bones around you say? Hrmmm. Wait. Check the skull heap here - that's right - hah! There! Now get to work!", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission18, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission18, 1) player:addItem(19090, 3) npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "blood") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission22) < 1 then + elseif MsgContains(message, "blood") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22) < 1 then npcHandler:say({ "Yes, I said blood. Important ingredient in necromantic rituals, usually. ...", "You need to spill some vials of blood tincture for this task. Probably means killing blood priests to get those vials. Ready to do this?", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission22, 1) - elseif MsgContains(message, "proceed") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission30) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission31) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission31, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22, 1) + elseif MsgContains(message, "proceed") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission30) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31, 1) player:addItem(19132, 1) player:addItem(19166, 1) npcHandler:say({ @@ -465,7 +460,7 @@ local function creatureSayCallback(npc, creature, type, message) "And take this parchment. Identify the right candles with it, take three with you and place one in front of the three shadowthrone statues, starting counterclockwise. Now go!", }, npc, creature) elseif MsgContains(message, "scroll") then - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) < 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) < 1 then npcHandler:say({ "Well, it is a rather long story. The short version: I had friends - no need to snigger. ...", "We were five highly brilliant dark summoners. We joined our forces to find the scroll of Youth and Life Eternal. ...", @@ -474,15 +469,15 @@ local function creatureSayCallback(npc, creature, type, message) "But I think I have a clue where we can find the first piece of the scroll. Would you go looking?", }, npc, creature) npcHandler:setTopic(playerId, 10) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) < 1 then npcHandler:say("Yes? Do you have the {scroll} piece?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) < 1 then npcHandler:say("Ah, hello! I take it you have the next {scroll} piece for me, {yes}?", npc, creature) npcHandler:setTopic(playerId, 12) - elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) < 1 then + elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) < 1 then if player:removeItem(18933, 1) then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission58, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58, 1) npcHandler:say({ "Oh, praise the Dark Lord! It is my scroll piece! Give it here! You can have this instead. ...", "Ahh, that feels GOOD. Now, only two pieces left to hunt down! On to the {next} scroll piece, yes?", @@ -492,32 +487,35 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission65) < 1 then + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65) < 1 then npcHandler:say("Hello, young apprentice. Do you have that {scroll} piece from the priestess?", npc, creature) player:addItem(19148, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) < 1 then - npcHandler:say("Welcome, welcome! Finally! The last {scroll} piece.... you do have it, haven't you?", npc, creature) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69) < 1 then + npcHandler:say("Hello, young apprentice. Do you have that scroll piece from the priestess?", npc, creature) npcHandler:setTopic(playerId, 15) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) < 1 then + npcHandler:say("Welcome, welcome! Finally! The last {scroll} piece.... you do have it, haven't you?", npc, creature) + npcHandler:setTopic(playerId, 18) end elseif MsgContains(message, "next") then - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) < 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) < 1 then npcHandler:say({ "Hah, developed a taste for it, have you? I believe the next scroll piece was hidden somewhere, my old friend being of a somewhat distrustful nature. ...", "The scent may not be lost, though - ask a shadow pupil if he can help - but be careful. ...", "Those shadow pupils are - strange. Try to find one who will answer and not kill you!", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission44, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) < 1 then npcHandler:say({ "Good! As you can imagine, I had a scroll piece, too. I hid it in my old quarters, northwest of the library. ...", "The door is magically sealed. Use this copper key with it to get inside. ...", "Beneath one of the chests is a secret stash, under a loose stone tile. The scroll piece should be inside. Off you go.", }, npc, creature) player:addItem(19173, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission52, 1) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) < 1 then player:addItem(19148, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission59, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59, 1) npcHandler:say({ "Hahah, eager for it, I like that! ...", "One piece stayed in the hands of a beautiful priestess. ...", @@ -525,16 +523,15 @@ local function creatureSayCallback(npc, creature, type, message) "Oh, one more thing! They only talk to you when you look like a fellow summoner. It's dangerous to go without a cape. Use this.", }, npc, creature) end - elseif MsgContains(message, "restore") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) <= 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) < 1 then --and npcHandler:getTopic(playerId) == 15 then + elseif npcHandler:getTopic(playerId) == 16 and MsgContains(message, "restore") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73) < 1 then if player:removeItem(19158, 1) then npcHandler:say({ "I knew it! I knew I had made a copy! Oh, I am so clever! ...", "Now, watch this. THERE. THE COMPLETE INCANTATION SCROLL. ...", "You have done well. Only one thing remains, and you shall be rich beyond your dreams. Ready for the really final task?", }, npc, creature) - --player:setStorageValue(Storage.GravediggerOfDrefia.Mission72, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission73, 1) - npcHandler:setTopic(playerId, 17) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73, 1) + npcHandler:setTopic(playerId, 19) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) @@ -546,7 +543,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage(MESSAGE_GREET, "At last, a visitor! Welcome to my... humble abode.") +npcHandler:setMessage(MESSAGE_GREET, "At last, a visitor! Welcome to my... humble abode. {Scroll} or {mission}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/one_eyed_joe.lua b/data-otservbr-global/npc/one_eyed_joe.lua index f8c36cead58..b1970ffded3 100644 --- a/data-otservbr-global/npc/one_eyed_joe.lua +++ b/data-otservbr-global/npc/one_eyed_joe.lua @@ -56,88 +56,117 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function creatureSayCallback(npc, creature, type, message) - local player = Player(creature) +local function greetCallback(npc, creature) + local player = creature:getPlayer() + if not player then + return false + end + local playerId = player:getId() + local currentTime = os.time() - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) == 3 then - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) == 3 then - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 4) - end + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) == 3 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) == 3 then player:addAchievement("Wail of the Banshee") - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 4) - doPlayerAddItem(creature, 16119, 1) - doPlayerAddItem(creature, 16120, 1) - doPlayerAddItem(creature, 16121, 1) - math.randomseed(os.time()) + player:addItem(16119, 1) + player:addItem(16120, 1) + player:addItem(16121, 1) local chanceToPirate = math.random(1, 4) - if chanceToPirate == 1 then - doPlayerAddItem(creature, 5926, 1) - elseif chanceToPirate == 2 then - doPlayerAddItem(creature, 6098, 1) - elseif chanceToPirate == 3 then - doPlayerAddItem(creature, 6097, 1) - elseif chanceToPirate == 4 then - doPlayerAddItem(creature, 6126, 1) - end - elseif (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) >= 0) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 3) then - npcHandler:say("Ah, the brave adventurer who sought to destroy the evil crystal down there. Have you been succesful?", npc, creature) - elseif MsgContains(message, "mission") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 0) and npcHandler:getTopic(playerId) < 1 then - npcHandler:setTopic(playerId, 1) + local pirateItems = { [1] = 5926, [2] = 6098, [3] = 6097, [4] = 6126 } + player:addItem(pirateItems[chanceToPirate], 1) + + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 4) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 4) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Time, currentTime + 20 * 60 * 60) + npcHandler:setMessage(MESSAGE_GREET, "Well done! But know this: The cursed crystal seems to regenerate over time. It could be necessary to come back and repeat whatever you have done down there.") + else + npcHandler:setMessage(MESSAGE_GREET, "Hello there. I'm sorry, I hardly noticed you. I'm a bit nervous. The spooky {sounds} down there, you know") + end + + return true +end + +local function creatureSayCallback(npc, creature, type, message) + local player = creature:getPlayer() + if not player then + return false + end + + local playerId = player:getId() + local currentTime = os.time() + local questTime = player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Time) + + if questTime > 0 and currentTime >= questTime then + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, -1) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, -1) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.MedusaOil, -1) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper, -1) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell, -1) + end + + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 0 and npcHandler:getTopic(playerId) < 1 then npcHandler:say({ "As for myself I haven't been down there. But I heard some disturbing rumours. In these caves are wonderful crystal formations. Some more poetically inclined fellows call them the crystal gardens. ...", "At first glance it seems to be a beautiful - and precious - surrounding. But in truth, deep down in these caverns exists an old evil. Want to hear more?", }, npc, creature) - elseif MsgContains(message, "yes") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 3) then - npcHandler:say({ "Hmm. No, i don't think so. I still feel this strange prickling in my toes." }, npc, creature) - elseif MsgContains(message, "no") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 3) then - npcHandler:say({ "Too bad." }, npc, creature) + npcHandler:setTopic(playerId, 1) + elseif MsgContains(message, "yes") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) > 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 3 then + npcHandler:say("Hmm. No, I don't think so. I still feel this strange prickling in my toes.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) > 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 3 then + npcHandler:say("Too bad.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "protect ears") then - npcHandler:say({ "Protect your ears? Hmm ... Wasn't there some fabulous seafarer who used wax or something to plug his ears? There was a story about horrible bird-women or something ...? No, sounds like hogwash, doesn't it." }, npc, creature) + npcHandler:say("Protect your ears? Hmm ... Wasn't there some fabulous seafarer who used wax or something to plug his ears? There was a story about horrible bird-women or something ...? No, sounds like hogwash, doesn't it.", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then - npcHandler:setTopic(playerId, 2) npcHandler:say({ "The evil I mentioned is a strange crystal, imbued with some kind of unholy energy. It is very hard to destroy, no weapon is able to shatter the thing. Maybe a jarring, very loud sound could destroy it. ...", "I heard of creatures, that are able to utter ear-splitting sounds. Don't remember the name, though. Would you go down there and try to destroy the crystal?", }, npc, creature) + npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 then - npcHandler:setTopic(playerId, 3) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) < 0 then - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 0) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) < 0 then + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 0) end - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 0) - npcHandler:say({ "Great! Good luck and be careful down there!" }, npc, creature) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 0) + npcHandler:say("Great! Good luck and be careful down there!", npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "crystals") then npcHandler:say({ "In my humble opinion a pirate should win a fortune by boarding ships not by crawling through caves and tunnels. But who am I to bring into question the captain's decision. All I know is that they sell the crystals at a high price. ...", "A certain amount of the crystals is ground to crystal dust with a special kind of mill. Don't ask me why. Some kind of magical component perhaps that they sell to mages and sorcerers.", }, npc, creature) - elseif MsgContains(message, "cursed") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 0) and npcHandler:getTopic(playerId) < 1 then - npcHandler:setTopic(playerId, 1) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "cursed") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 0 and npcHandler:getTopic(playerId) < 1 then npcHandler:say({ "As for myself I haven't been down there. But I heard some disturbing rumours. In these caves are wonderful crystal formations. Some more poetically inclined fellows call them the crystal gardens. ...", "At first glance it seems to be a beautiful - and precious - surrounding. But in truth, deep down in these caverns exists an old evil. Want to hear more?", }, npc, creature) + npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "sounds") then npcHandler:say({ "These caves are incredibly beautiful, {crystals} in vibrant colours grow there like exotic flowers. There are more than a few captains who send down their men in order to quarry the precious crystals. ...", "But there are few volunteers. Often the crystal gatherers disappear and are never seen again. Other poor fellows then meet their former shipmates in the form of ghosts or skeletons. It's a {cursed} area, something evil is down there!", }, npc, creature) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "job") then - npcHandler:say({ "I'm a pirate. Normally I'm sailing the seas, boarding other ships and gathering treasures. But at the moment my captain graciously assigned me to watch this {cursed} entrance." }, npc, creature) + npcHandler:say("I'm a pirate. Normally I'm sailing the seas, boarding other ships and gathering treasures. But at the moment my captain graciously assigned me to watch this {cursed} entrance.", npc, creature) elseif MsgContains(message, "name") then - npcHandler:say({ "I'm One-Eyed Joe. From Josephina, got that? And I regard this eye patch as a personal feature of beauty!" }, npc, creature) + npcHandler:say("I'm One-Eyed Joe. From Josephina, got that? And I regard this eye patch as a personal feature of beauty!", npc, creature) elseif MsgContains(message, "bye") then npcHandler:say("Good bye adventurer. It was nice to talk with you.", npc, creature) - npcHandler:removeInteraction(npc, creature) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) >= 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 3 then + npcHandler:say("Ah, the brave adventurer who sought to destroy the evil crystal down there. Have you been successful?", npc, creature) + npcHandler:setTopic(playerId, 0) end + return true end -npcHandler:setMessage(MESSAGE_GREET, "Hello there. I'm sorry, I hardly noticed you. I'm a bit nervous. The spooky {sounds} down there, you know") - +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/padreia.lua b/data-otservbr-global/npc/padreia.lua index f6bd6803ccb..0b9d961248a 100644 --- a/data-otservbr-global/npc/padreia.lua +++ b/data-otservbr-global/npc/padreia.lua @@ -63,20 +63,20 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Do you want to buy a bottle of cough syrup for 50 gold?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.TheExterminator) == -1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == -1 then npcHandler:say({ "Oh " .. player:getName() .. ", thank god you came to me. Last night, I had a vision about an upcoming plague here in Carlin. ...", "It will originate from slimes that will swarm out of the sewers and infect every citizen with a deadly disease. Are you willing to help me save Carlin?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.TibiaTales.TheExterminator) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == 1 then npcHandler:say("You MUST find that slime pool immediately or life here in Carlin will not be the same anymore.", npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.TheExterminator) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == 2 then local itemId = { 3033, 3032, 3030, 3029 } for i = 1, #itemId do player:addItem(itemId[i], 1) end - player:setStorageValue(Storage.TibiaTales.TheExterminator, 3) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 3) npcHandler:say("You did it! Even if only few of the Carliners will ever know about that, you saved all of their lives. Here, take this as a reward. Farewell!", npc, creature) else npcHandler:say("Maybe the guards have something to do for you or know someone who could need some help.", npc, creature) @@ -92,7 +92,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(4828, 1) elseif npcHandler:getTopic(playerId) == 2 then player:addItem(135, 1) - player:setStorageValue(Storage.TibiaTales.TheExterminator, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 1) npcHandler:say({ "I knew I could count on you. Take this highly intensified vermin poison. In my vision, I saw some kind of 'pool' where these slimes came from. ...", "Pour the poison in the water to stop the demise of Carlin. Tell me about your mission after you fulfilled your task.", diff --git a/data-otservbr-global/npc/prezil.lua b/data-otservbr-global/npc/prezil.lua index 07813991e8e..37142dea55c 100644 --- a/data-otservbr-global/npc/prezil.lua +++ b/data-otservbr-global/npc/prezil.lua @@ -64,11 +64,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/quandons_ghost.lua b/data-otservbr-global/npc/quandons_ghost.lua index 257424177cb..183fb554690 100644 --- a/data-otservbr-global/npc/quandons_ghost.lua +++ b/data-otservbr-global/npc/quandons_ghost.lua @@ -50,12 +50,29 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) - -local function creatureSayCallback(npc, creature, type, message) +local function greetCallback(npc, creature) local player = Player(creature) + local playerId = player:getId() + + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15) == 3 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16) < 1 then + npcHandler:setMessage(MESSAGE_GREET, { + "He murdered me. I shouldn't have trusted him! The money! All that money blinded me! To the east I brought his stuff. In night and darkness, covered by some kind of magic of his. The minotaurs did not bother us, like he promised. ...", + "His ... his true name is Shargon and he is a priest of some kind. He belongs to a powerful secret society and is looking for something on their behalves. ...", + "We brought his stuff to a hideout, I'll mark it on your map! The things that I've seen there! Horrible, horrible things! I fled, but he found me, killed me. He murdered me!", + }) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16, 1) + else + npcHandler:setMessage(MESSAGE_GREET, "Hi!") + end + + return true end --- Missing script for complete the mission 15 of dark trails +local function creatureSayCallback(npc, creature, type, message) end + +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 npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/queen_eloise.lua b/data-otservbr-global/npc/queen_eloise.lua index 0467bb6e74a..e4fd566e422 100644 --- a/data-otservbr-global/npc/queen_eloise.lua +++ b/data-otservbr-global/npc/queen_eloise.lua @@ -173,9 +173,9 @@ node1:addChildKeyword({ "yes" }, StdModule.promotePlayer, { npcHandler = npcHand node1:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, onlyFocus = true, text = "Alright then, come back when you are ready.", reset = true }) -- Postman keywordHandler:addKeyword({ "uniforms" }, StdModule.say, { npcHandler = npcHandler, text = "I remember about those uniforms, they had a camouflage inlay so they could be worn the inside out too. I will send some color samples via mail to Mr. Postner." }, function(player) - return player:getStorageValue(Storage.Postman.Mission06) == 5 + return player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 5 end, function(player) - player:setStorageValue(Storage.Postman.Mission06, 6) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 6) end) -- Greeting diff --git a/data-otservbr-global/npc/quentin.lua b/data-otservbr-global/npc/quentin.lua index 5a60aded8e0..1fad4b555fa 100644 --- a/data-otservbr-global/npc/quentin.lua +++ b/data-otservbr-global/npc/quentin.lua @@ -100,11 +100,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Quentin) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Quentin, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/rabaz.lua b/data-otservbr-global/npc/rabaz.lua index 79786f59cc4..df9e8ca2ca5 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.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_6.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.Questline) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_6.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.Questline, 1) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.ChestDoor, 0) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 1) + player:setStorageValue(Storage.Quest.U8_6.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.Questline, 4) + player:setStorageValue(Storage.Quest.U8_6.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/rahkem.lua b/data-otservbr-global/npc/rahkem.lua index a50f7c2aa7c..6730ab0b8f5 100644 --- a/data-otservbr-global/npc/rahkem.lua +++ b/data-otservbr-global/npc/rahkem.lua @@ -75,11 +75,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Rahkem) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Rahkem) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Rahkem, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Rahkem, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/rock_with_a_soft_spot.lua b/data-otservbr-global/npc/rock_with_a_soft_spot.lua index 2709608d394..cac1a3af1eb 100644 --- a/data-otservbr-global/npc/rock_with_a_soft_spot.lua +++ b/data-otservbr-global/npc/rock_with_a_soft_spot.lua @@ -64,11 +64,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.RockWithASoftSpot) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.RockWithASoftSpot) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.RockWithASoftSpot, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.RockWithASoftSpot, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/roswitha.lua b/data-otservbr-global/npc/roswitha.lua index f13d91e7fe4..4999259c5d8 100644 --- a/data-otservbr-global/npc/roswitha.lua +++ b/data-otservbr-global/npc/roswitha.lua @@ -55,16 +55,18 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "Harsin") then - if player:getStorageValue(Storage.DarkTrails.Mission13) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission13) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) < 1 then npcHandler:say("I'm sorry, but Harsin no longer lives here. He ordered a local named Quandon to transport all his stuff somewhere. I don't know where he moved, but Quandon should be able to help you with this information.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission14, 1) - player:setStorageValue(Storage.DarkTrails.DoorQuandon, 1) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14, 1) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.DoorQuandon, 1) npcHandler:setTopic(playerId, 0) end end + return true end +npcHandler:setMessage(MESSAGE_GREET, "Hello, my lad. Sit down, have a drink, why don't you?") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/sandomo.lua b/data-otservbr-global/npc/sandomo.lua index 75d1015233b..5086a6750df 100644 --- a/data-otservbr-global/npc/sandomo.lua +++ b/data-otservbr-global/npc/sandomo.lua @@ -52,9 +52,9 @@ end function Player.getInquisitionGold(self) local v = { - math.max(0, self:getStorageValue(ROSHAMUUL_MORTAR_THROWN)) * 100, - math.max(0, self:getStorageValue(ROSHAMUUL_KILLED_FRAZZLEMAWS)), - math.max(0, self:getStorageValue(ROSHAMUUL_KILLED_SILENCERS)), + math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) * 100, + math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws)), + math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers)), } return v[1] + v[2] + v[3] end @@ -102,9 +102,9 @@ local function creatureSayCallback(npc, creature, type, message) if player:getInquisitionGold() > 0 then npcHandler:setTopic(playerId, 4) npcHandler:say({ - "Alright, so you mixed and delivered " .. math.max(0, player:getStorageValue(ROSHAMUUL_MORTAR_THROWN)) .. " mortar and ...", - "You killed " .. math.max(0, player:getStorageValue(ROSHAMUUL_KILLED_FRAZZLEMAWS)) .. " frazzlemaws and ...", - "You also hunted " .. math.max(0, player:getStorageValue(ROSHAMUUL_KILLED_SILENCERS)) .. " silencers. That would equal " .. player:getInquisitionGold() .. " of inquisition gold - BUT we are currently short of this valuable metal so... do you want me to add this amount to my {books} for now or {trade} it for something else.", + "Alright, so you mixed and delivered " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) .. " mortar and ...", + "You killed " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws)) .. " frazzlemaws and ...", + "You also hunted " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers)) .. " silencers. That would equal " .. player:getInquisitionGold() .. " of inquisition gold - BUT we are currently short of this valuable metal so... do you want me to add this amount to my {books} for now or {trade} it for something else.", }, npc, creature) else npcHandler:setTopic(playerId, nil) @@ -112,7 +112,7 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif npcHandler:getTopic(playerId) == 4 then - local v = math.max(0, player:getStorageValue(ROSHAMUUL_GOLD_RECORD)) + local v = math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record)) if MsgContains(message, "book") or MsgContains(message, "books") then npcHandler:setTopic(playerId, 5) npcHandler:say({ @@ -126,21 +126,21 @@ local function creatureSayCallback(npc, creature, type, message) "Good. Registered as... " .. player:getName() .. "... with... about " .. player:getInquisitionGold() .. " of righteously earned inquisition gold added. There. Thanks for your help! ..", "Good. Ask me any time in case you want to know your current {record}. If you have time, Remember you can also {trade} your earnings into some of these... probably far more valuable, ahem... cluster... things, yes.", }, npc, creature) - player:setStorageValue(ROSHAMUUL_GOLD_RECORD, player:getInquisitionGold()) - player:setStorageValue(ROSHAMUUL_MORTAR_THROWN, 0) - player:setStorageValue(ROSHAMUUL_KILLED_FRAZZLEMAWS, 0) - player:setStorageValue(ROSHAMUUL_KILLED_SILENCERS, 0) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record, player:getInquisitionGold()) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown, 0) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws, 0) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers, 0) npcHandler:setTopic(playerId, nil) end elseif MsgContains(message, "record") then - local v = player:getStorageValue(ROSHAMUUL_GOLD_RECORD) + local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) if v > 0 then npcHandler:say("You have " .. v .. " inquisition gold registered in my book.", npc, creature) else npcHandler:say("I do not see inquisition gold registered in my book from you.", npc, creature) end elseif MsgContains(message, "trade") then - local v = player:getStorageValue(ROSHAMUUL_GOLD_RECORD) + local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) if v >= 100 then npcHandler:setTopic(playerId, 6) npcHandler:say("Ah yes, you currently have " .. v .. " of righteously earned inquisition gold in my book. 100 inquisition gold equals one cluster. How many clusters do you want in exchange?", npc, creature) @@ -154,15 +154,15 @@ local function creatureSayCallback(npc, creature, type, message) return npcHandler:say("You should tell me a real number.", npc, creature) end - local max = math.floor(player:getStorageValue(ROSHAMUUL_GOLD_RECORD) / 100) + local max = math.floor(player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) / 100) if v > max then return npcHandler:say("You do not have enough inquisition gold for that, so far you can ask for up to " .. max .. " clusters.", npc, creature) end player:addItem(20062, v) npcHandler:setTopic(playerId, nil) - player:setStorageValue(ROSHAMUUL_GOLD_RECORD, player:getStorageValue(ROSHAMUUL_GOLD_RECORD) - (v * 100)) - npcHandler:say("There you are. Now I register " .. player:getStorageValue(ROSHAMUUL_GOLD_RECORD) .. " inquisition gold of yours in my book.", npc, creature) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) - (v * 100)) + npcHandler:say("There you are. Now I register " .. player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) .. " inquisition gold of yours in my book.", npc, creature) end if MsgContains(message, "bucket") or MsgContains(message, "supplies") then diff --git a/data-otservbr-global/npc/sholley.lua b/data-otservbr-global/npc/sholley.lua index b1f41912793..a7d42d419a0 100644 --- a/data-otservbr-global/npc/sholley.lua +++ b/data-otservbr-global/npc/sholley.lua @@ -55,26 +55,32 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "friend") then - if player:getStorageValue(Storage.DarkTrails.Mission12) == 1 then - npcHandler:say("So you have proven yourself a true friend of our city. It's hard to believe but I think your words only give substance to suspicions my heart had harboured since quite a while. ...", npc, creature) - npcHandler:say("So Harsin is probably not the person he appeared to be. Actually I haven't heard from him for quite a while. He was resident in the local bed and breakfast hotel. You should be able to find him there or at least to learn about his whereabouts.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission13, 1) + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission12) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission13) < 1 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 50 then + npcHandler:say({ + "So you have proven yourself a true friend of our city. It's hard to believe but I think your words only give substance to suspicions my heart had harboured since quite a while. ...", + "So Harsin is probably not the person he appeared to be. Actually I haven't heard from him for quite a while. He was resident in the local bed and breakfast hotel. You should be able to find him there or at least to learn about his whereabouts.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission13, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "quandon") then - if player:setStorageValue(Storage.DarkTrails.Mission14) == 2 then - npcHandler:say("A transporter dead? This is more then alarming. It seems Harsin is up to something and whatever it is, it's nothing good at all. But not all is lost. A local medium, Barnabas, has truly the gift to speak to the dead. ...", npc, creature) - npcHandler:say("I'll mark his home on your map. He should be able to get the information you need to locate Harsin.", npc, creature) - player:setStorageValue(Storage.DarkTrails.Mission15, 1) + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) == 2 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15) < 1 then + npcHandler:say({ + "A transporter dead? This is more then alarming. It seems Harsin is up to something and whatever it is, it's nothing good at all. But not all is lost. A local medium, Barnabas, has truly the gift to speak to the dead. ...", + "I'll mark his home on your map. He should be able to get the information you need to locate Harsin.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Already clicked the body on the house Roswitha ?", npc, creature) npcHandler:setTopic(playerId, 0) end end + return true end +npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/sister_of_jack.lua b/data-otservbr-global/npc/sister_of_jack.lua index a93950dcf28..e73b91f0b67 100644 --- a/data-otservbr-global/npc/sister_of_jack.lua +++ b/data-otservbr-global/npc/sister_of_jack.lua @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "jack") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 5 then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Mother == 1) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Sister)) < 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother == 1) and (player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Sister)) < 1 then npcHandler:say("Why are you asking, he didn't get himself into something again did he?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -95,8 +95,8 @@ local function creatureSayCallback(npc, creature, type, message) "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) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Sister, 1) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 6) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Sister, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 6) end end return true diff --git a/data-otservbr-global/npc/spectulus.lua b/data-otservbr-global/npc/spectulus.lua index 20257671367..9856bce82c0 100644 --- a/data-otservbr-global/npc/spectulus.lua +++ b/data-otservbr-global/npc/spectulus.lua @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "research") and player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 11 then + if MsgContains(message, "research") and player:getStorageValue(Storage.Quest.U8_7.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 @@ -164,22 +164,22 @@ local function creatureSayCallback(npc, creature, type, message) end 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.Quest.U8_54.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) < 1) then + elseif (player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.Quest.U8_7.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 + elseif player:getStorageValue(Storage.Quest.U8_7.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 + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 4 then 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 + elseif player:getStorageValue(Storage.Quest.U8_7.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 + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then 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 + elseif player:getStorageValue(Storage.Quest.U8_7.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! 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. ...", @@ -191,7 +191,7 @@ local function creatureSayCallback(npc, creature, type, message) "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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 10) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then @@ -308,8 +308,8 @@ local function creatureSayCallback(npc, creature, type, message) "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.Quest.U8_54.SeaOfLight.Questline, 11) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_7.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 do everything ourselves. Are you ready to continue?", npc, creature) @@ -320,7 +320,7 @@ local function creatureSayCallback(npc, creature, type, message) "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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 3) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 32 then npcHandler:say({ @@ -329,7 +329,7 @@ local function creatureSayCallback(npc, creature, type, message) "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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 5) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 33 then npcHandler:say({ @@ -337,11 +337,11 @@ local function creatureSayCallback(npc, creature, type, message) "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) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 7) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "jack") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then npcHandler:say({ "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. ...", diff --git a/data-otservbr-global/npc/talphion.lua b/data-otservbr-global/npc/talphion.lua index 362dea22509..e48a26129b9 100644 --- a/data-otservbr-global/npc/talphion.lua +++ b/data-otservbr-global/npc/talphion.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "dress pattern") then - if player:getStorageValue(Storage.Postman.Mission06) == 3 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 3 then if npcHandler:getTopic(playerId) < 1 then npcHandler:say("DRESS FLATTEN? WHO WANTS ME TO FLATTEN A DRESS?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -73,7 +73,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("AH YES! I WORKED ON THE DRESS PATTERN FOR THOSE UNIFORMS. STAINLESS TROUSERES, STEAM DRIVEN BOOTS! ANOTHERMARVEL TO BEHOLD! I'LL SENT A COPY TO KEVIN IMEDIATELY!", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 4) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/tarun.lua b/data-otservbr-global/npc/tarun.lua index 9f0b8be5883..65b9882f90e 100644 --- a/data-otservbr-global/npc/tarun.lua +++ b/data-otservbr-global/npc/tarun.lua @@ -62,7 +62,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local theLostBrotherStorage = player:getStorageValue(Storage.AdventurersGuild.TheLostBrother) + local theLostBrotherStorage = player:getStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest) if MsgContains(message, "mission") then if theLostBrotherStorage < 1 then npcHandler:say({ @@ -80,16 +80,16 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) player:addItem(3039, 1) player:addExperience(3000, true) - player:setStorageValue(Storage.AdventurersGuild.TheLostBrother, 3) + player:setStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then npcHandler:say("I thank you! This is more than I could hope!", npc, creature) if theLostBrotherStorage < 1 then - player:setStorageValue(Storage.AdventurersGuild.QuestLine, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.QuestLine, 1) end - player:setStorageValue(Storage.AdventurersGuild.TheLostBrother, 1) + player:setStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest, 1) elseif MsgContains(message, "no") then npcHandler:say("As you wish.", npc, creature) end @@ -106,7 +106,7 @@ local function onTradeRequest(npc, creature) end local playerId = player:getId() - if player:getStorageValue(Storage.AdventurersGuild.TheLostBrother) ~= 3 then + if player:getStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest) ~= 3 then return false end diff --git a/data-otservbr-global/npc/tereban_functions.lua b/data-otservbr-global/npc/tereban_functions.lua index 40ba653228d..9ffb25713bc 100644 --- a/data-otservbr-global/npc/tereban_functions.lua +++ b/data-otservbr-global/npc/tereban_functions.lua @@ -1,19 +1,19 @@ local topic = {} local storages = { - Storage.FathersBurden.Sinew, - Storage.FathersBurden.Wood, - Storage.FathersBurden.Cloth, - Storage.FathersBurden.Silk, - Storage.FathersBurden.Crystal, - Storage.FathersBurden.Root, - Storage.FathersBurden.Iron, - Storage.FathersBurden.Scale, + Storage.Quest.U8_6.AFathersBurden.Sinew, + Storage.Quest.U8_6.AFathersBurden.Wood, + Storage.Quest.U8_6.AFathersBurden.Cloth, + Storage.Quest.U8_6.AFathersBurden.Silk, + Storage.Quest.U8_6.AFathersBurden.Crystal, + Storage.Quest.U8_6.AFathersBurden.Root, + Storage.Quest.U8_6.AFathersBurden.Iron, + Storage.Quest.U8_6.AFathersBurden.Scale, } TerebanConfig = { ["strong sinew"] = { - storage = Storage.FathersBurden.Sinew, + storage = Storage.Quest.U8_6.AFathersBurden.Sinew, messages = { deliever = "Do you have the required sinew?", success = "Ah, not only did you bring some sinew to me, you also made the world a safer place by killing Heoni.", @@ -24,7 +24,7 @@ TerebanConfig = { itemId = 10592, -- Strong sinew }, ["exquisite wood"] = { - storage = Storage.FathersBurden.Wood, + storage = Storage.Quest.U8_6.AFathersBurden.Wood, messages = { deliever = "Could you find the wood we were talking about?", success = "Thank you. I feel somewhat embarrassed to put you into such a danger for some birthday present but I am sure you can handle it.", @@ -35,7 +35,7 @@ TerebanConfig = { itemId = 10591, -- Exquisite wood }, ["spectral cloth"] = { - storage = Storage.FathersBurden.Cloth, + storage = Storage.Quest.U8_6.AFathersBurden.Cloth, messages = { deliever = "Could you find the cloth I am looking for?", success = "It looks a bit scary but I guess sorcerers might even find that appealing. Thank you very much.", @@ -46,7 +46,7 @@ TerebanConfig = { itemId = 10590, -- Spectral cloth }, ["exquisite silk"] = { - storage = Storage.FathersBurden.Silk, + storage = Storage.Quest.U8_6.AFathersBurden.Silk, messages = { deliever = "So you've found the silk that I need?", success = "Great. I better don't think about how big a spider has to be to produce such strands of silk.", @@ -57,7 +57,7 @@ TerebanConfig = { itemId = 10589, -- Exquisite silk }, ["magic crystal"] = { - storage = Storage.FathersBurden.Crystal, + storage = Storage.Quest.U8_6.AFathersBurden.Crystal, messages = { deliever = "Did you find the required crystal?", success = "Oh look at the colours and sparkles. This crystal is truly remarkable, thank you.", @@ -68,7 +68,7 @@ TerebanConfig = { itemId = 10596, -- Magical crystal }, ["mystic root"] = { - storage = Storage.FathersBurden.Root, + storage = Storage.Quest.U8_6.AFathersBurden.Root, messages = { deliever = "Could you find the root which we are looking for?", success = "You are admirably determined in fulfilling your task. I will make sure that my sons appreciate what you did for their presents.", @@ -79,7 +79,7 @@ TerebanConfig = { itemId = 10595, -- Mystic root }, ["old iron"] = { - storage = Storage.FathersBurden.Iron, + storage = Storage.Quest.U8_6.AFathersBurden.Iron, messages = { deliever = "Have you found the iron that we need for the present?", success = "I wish there'd an easier way to get that iron but those dwarfs are so stubborn. However, now we got what we need.", @@ -90,7 +90,7 @@ TerebanConfig = { itemId = 10593, -- Old iron }, ["flexible dragon scale"] = { - storage = Storage.FathersBurden.Scale, + storage = Storage.Quest.U8_6.AFathersBurden.Scale, messages = { deliever = "Could you get Glitterscale's scales yet?", success = "These scales must have belonged to a fearsome beast. I envy you for your bravery.", @@ -131,20 +131,20 @@ function ParseTerebanSay(npc, creature, message, npcHandler) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.FathersBurden.Status) == 1 then - if player:getStorageValue(Storage.FathersBurden.Progress) ~= 8 then + if player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Status) == 1 then + if player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress) ~= 8 then npcHandler:say("Well, I need the parts of a sorcerer's robe, a paladin's bow, a knight's shield, and a druid's rod. If you cannot find one of them, ask me about it and I might provide you with some minor hints.", npc, creature) return true end - player:setStorageValue(Storage.FathersBurden.Status, 2) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Status, 2) player:addItem(oldCape, 1) player:addExperience(8000, true) npcHandler:say({ "I'm so glad I finally have all the parts for the presents. Your reward is my eternal gratitude. Well, that and some gold of course. ...", "Take this sachet over there, I wrapped the coins into this old cape I had still lying around here from a barter with a stranger, it is of no use for me anyway. Farewell and thank you once again.", }, npc, creature) - elseif player:getStorageValue(Storage.FathersBurden.Status) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Status) == 2 then npcHandler:say("Thank you for your help!", npc, creature) return true else @@ -173,9 +173,9 @@ function ParseTerebanSay(npc, creature, message, npcHandler) elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then npcHandler:say("I am relieved someone as capable as you will handle the task. Well, I need the parts of a sorcerer's robe, a paladin's bow, a knight's shield, and a druid's wand.", npc, creature) - player:setStorageValue(Storage.FathersBurden.QuestLog, 1) - player:setStorageValue(Storage.FathersBurden.Progress, 0) - player:setStorageValue(Storage.FathersBurden.Status, 1) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.QuestLog, 1) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress, 0) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Status, 1) for i = 1, #storages do player:setStorageValue(storages[i], 1) end @@ -192,7 +192,7 @@ function ParseTerebanSay(npc, creature, message, npcHandler) end player:setStorageValue(targetMessage.storage, 2) - player:setStorageValue(Storage.FathersBurden.Progress, player:getStorageValue(Storage.FathersBurden.Progress) + 1) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress, player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress) + 1) player:addExperience(2500, true) npcHandler:say(targetMessage.messages.success, npc, creature) elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/terrence.lua b/data-otservbr-global/npc/terrence.lua index fa1597f0fa2..722107baffa 100644 --- a/data-otservbr-global/npc/terrence.lua +++ b/data-otservbr-global/npc/terrence.lua @@ -54,19 +54,25 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - -- Missing script for complete the mission 16 of dark trails - if MsgContains(message, "mission") then - if player:getStorageValue(Storage.DarkTrails.Mission16) == 1 then - npcHandler:say("Ahhhhhhhh! Find and investigate the hideout, the mission 17", npc, creature) - setPlayerStorageValue(creature, Storage.DarkTrails.Mission17, 1) - setPlayerStorageValue(creature, Storage.DarkTrails.DoorHideout, 1) + if MsgContains(message, "manway") then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission17) < 1 then + npcHandler:say("I'm not allowed to let just anyone pass. If you have proven your willingness and effort to participate in the fighting, I'm allowed to let you pass.", npc, creature) + npcHandler:setTopic(playerId, 1) + else + npcHandler:say("Ahhhhhhhh! ", npc, creature) + npcHandler:setTopic(playerId, 0) end - else - npcHandler:say("Ahhhhhhhh! ", npc, creature) + elseif MsgContains(message, "effort") and npcHandler:getTopic(playerId) == 1 then + npcHandler:say("You fought hard enough against the minotaurs. Since you've shown so much effort in our war, I'll let you pass through the gate.", npc, creature) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission17, 1) + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.DoorHideout, 1) + npcHandler:setTopic(playerId, 0) end + return true end +npcHandler:setMessage(MESSAGE_GREET, " Hey there, you are surely interested in helping the Rathleton city guard, right? Right - especially now since the dreaded minotaurs gain more ground every day.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/the_beggar_king.lua b/data-otservbr-global/npc/the_beggar_king.lua index 4e1eb70f7ca..1fd246c2c40 100644 --- a/data-otservbr-global/npc/the_beggar_king.lua +++ b/data-otservbr-global/npc/the_beggar_king.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.DarkTrails.Mission01) == 2 and player:getStorageValue(Storage.DarkTrails.Mission02) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01) == 2 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission02) == 1 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door) == 1 then npcHandler:say("So I guess you are the one that the magistrate is sending to look after us, eh? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -93,8 +93,7 @@ local function creatureSayCallback(npc, creature, type, message) "But since you are investigating on their behalf, you might work out some agreement with them, if you're mad enough to enter the sewers at all. ... ", "However, you will have to talk to one of the Glooth Brothers who are responsible for the sewer system's maintenance. You'll find them somewhere down there.", }, npc, creature, 10) - player:setStorageValue(Storage.DarkTrails.Mission02, 2) -- Mission 2 end - player:setStorageValue(Storage.DarkTrails.Mission03, 1) -- Mission 3 start + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission02, 2) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/tomruk_the_ruddy.lua b/data-otservbr-global/npc/tomruk_the_ruddy.lua index 9fe479e2d77..a8efc75f927 100644 --- a/data-otservbr-global/npc/tomruk_the_ruddy.lua +++ b/data-otservbr-global/npc/tomruk_the_ruddy.lua @@ -62,7 +62,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission36) < 1 then + if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36) < 1 then npcHandler:say({ "So someone sent you after a scroll, eh? A stroll for a scroll! Sounds like an old-fashioned necromancer thing. ...", "Well, this piece here is a rather fascinating thing - see those strange blood stains? - ...", @@ -70,27 +70,27 @@ local function creatureSayCallback(npc, creature, type, message) "Ah, so you want it, too? Well, do me a favour: fetch two samples and assist in my experiment, in exchange for the scroll piece. Yes?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) == 1 then npcHandler:say({ "Sanguine! I need two different blood samples - The first one from the necromancer's pure blood chamber. ... ", "I was barred from the premises. For my research! Shameful! I'm a martyr to the cause - oh, the second sample you said? ...", "The second sample you must retrieve from the sacrificial chamber in the ancient vampire crypts, first floor, far west. ...", "Take these two sterilised vials, one for each blood basin. Oh, I wish I could go myself! Come back when you have filled both vials.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission36, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36, 1) player:addItem(19100, 2) npcHandler:setTopic(playerId, 0) - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission") or MsgContains(message, "blood")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission37) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission38) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission") or MsgContains(message, "blood")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission37) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38) < 1 then npcHandler:say("Hello hello! Did you bring those blood samples?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission37) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission37) == 1 then if player:getItemCount(19102) >= 1 and player:getItemCount(19101) >= 1 then npcHandler:say({ "Now, let me see... yes... yes... very good. Let me add THIS ..... swill it... there. Sanguine! ...", "We're not finished yet. Take this tainted blood vial ...", "Dab some drops from it on to the four blood pagodas in the inner circle here. Then pull the lightning lever over there.", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission38, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38, 1) player:removeItem(19101, 1) player:removeItem(19102, 1) player:addItem(19133, 1) @@ -99,30 +99,31 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You haven't got any blood.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission40) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission41) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41) < 1 then npcHandler:say("Hello hello! Did Hello hello! Well now, painted all those blood pagodas properly?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission40) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40) == 1 then npcHandler:say({ "Sanguine! Did you see those sparks! We definitely had some energy transfer! Well done! Now, for your reward. ...", "Err... I would awfully like to know more about the scroll ...", "Would you settle for a heartfelt handshake instead - oh, you wouldn't? Well, er, okay ...", "Give me a minute or two to retrieve it. Ask me for the {scroll} or the {mission}", }, npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission41, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41, 1) npcHandler:setTopic(playerId, 0) - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission41) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) < 1 then npcHandler:say("Hello hell- oh, you've come for the scroll, haven't you?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission41) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41) == 1 then npcHandler:say("My heart bleeds to part from it. Here. Extend your hand - I'll just retrieve some blood from in exchange - HOLD STILL.", npc, creature) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission42, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42, 1) player:addItem(18933, 1) npcHandler:setTopic(playerId, 0) end return true end +npcHandler:setMessage(MESSAGE_GREET, "Hello hello! Always good to see fresh blood! What brings you here?") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/tyrias.lua b/data-otservbr-global/npc/tyrias.lua index 6ea39bab9f2..1a1e76770c8 100644 --- a/data-otservbr-global/npc/tyrias.lua +++ b/data-otservbr-global/npc/tyrias.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Tyrias) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Tyrias) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Tyrias, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Tyrias, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/ubaid.lua b/data-otservbr-global/npc/ubaid.lua index 6d46bb32d9c..32f36a35be7 100644 --- a/data-otservbr-global/npc/ubaid.lua +++ b/data-otservbr-global/npc/ubaid.lua @@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- To Appease the Mighty Quest - if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 2 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 2 then npcHandler:say({ "You have the smell of the Marid on you. Tell me who sent you?", }, npc, creature) @@ -109,7 +109,7 @@ local function creatureSayCallback(npc, creature, type, message) "And he is sending a worm like you to us!?! The mighty Efreet!! Tell him that we won't be part in his 'great' plans and now LEAVE!! ...", "...or do you want to join us and fight those stinking Marid who claim themselves to be noble and righteous?!? Just let me know.", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) end if MsgContains(message, "passage") then diff --git a/data-otservbr-global/npc/umar.lua b/data-otservbr-global/npc/umar.lua index 4836c568958..b6a72878425 100644 --- a/data-otservbr-global/npc/umar.lua +++ b/data-otservbr-global/npc/umar.lua @@ -103,7 +103,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- To Appease the Mighty Quest - if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 1 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 1 then npcHandler:say({ "I should go and tell Fa'hradin. ...", "I am impressed you know our address of welcome! I honour that. So tell me who sent you on a mission to our fortress?", @@ -114,7 +114,7 @@ local function creatureSayCallback(npc, creature, type, message) "How dare you lie to me?!? The caliph should choose his envoys more carefully. We will not accept his peace-offering ...", "...but we are always looking for support in our fight against the evil Efreets. Tell me if you would like to join our fight.", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) end if MsgContains(message, "passage") then diff --git a/data-otservbr-global/npc/uzon.lua b/data-otservbr-global/npc/uzon.lua index 112dee20086..b54b5d4d5d3 100644 --- a/data-otservbr-global/npc/uzon.lua +++ b/data-otservbr-global/npc/uzon.lua @@ -78,8 +78,8 @@ addTravelKeyword("zao", "Do you seek a ride to Farmine for |TRAVELCOST|?", 60, P return player:getStorageValue(TheNewFrontier.Mission10[1]) ~= 2 end) addTravelKeyword("edron", "Do you seek a ride to Edron for |TRAVELCOST|?", 60, Position(33193, 31783, 3), nil, function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 2 then - player:setStorageValue(Storage.Postman.Mission01, 3) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 2 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 3) end end) addTravelKeyword("darashia", "Do you seek a ride to Darashia on Darama for |TRAVELCOST|?", 60, Position(33270, 32441, 6)) diff --git a/data-otservbr-global/npc/yberius.lua b/data-otservbr-global/npc/yberius.lua index ab6a48d323b..4d561cc5ced 100644 --- a/data-otservbr-global/npc/yberius.lua +++ b/data-otservbr-global/npc/yberius.lua @@ -68,11 +68,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Yberius) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Yberius) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Yberius, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Yberius, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/zarifan.lua b/data-otservbr-global/npc/zarifan.lua index d7d250d56d9..34abb38be0b 100644 --- a/data-otservbr-global/npc/zarifan.lua +++ b/data-otservbr-global/npc/zarifan.lua @@ -62,18 +62,31 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "magic") and player:getStorageValue(12902) < 1 then + if MsgContains(message, "magic") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission70) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) < 1 then npcHandler:say("...Tell me...the first... magic word.", npc, creature) - player:setStorageValue(12902, 1) + npcHandler:setTopic(playerId, 1) + elseif npcHandler:getTopic(playerId) == 1 and MsgContains(message, "friendship") then + npcHandler:say("Yes... YES... friendship... now... second word?", npc, creature) + npcHandler:setTopic(playerId, 2) + elseif npcHandler:getTopic(playerId) == 2 and MsgContains(message, "lives") then + npcHandler:say("Yes... YES... friendship... lives... now third word?", npc, creature) + npcHandler:setTopic(playerId, 3) + elseif npcHandler:getTopic(playerId) == 3 and MsgContains(message, "forever") then + npcHandler:say({ + "Yes... YES... friendship... lives... FOREVER. ...", + "What you seek.... is buried. Beneath the sand. No graves. ...", + "Between a triangle of big stones you must dig... in the eastern caves. ...", + "And say hello... to... my old friend... Omrabas.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71, 1) else npcHandler:say("...continue with your mission...", npc, creature) end end + keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = "..what about {magic}.." }) -keywordHandler:addKeyword({ "friendship" }, StdModule.say, { npcHandler = npcHandler, text = "Yes... YES... friendship... now... second word?" }) -keywordHandler:addKeyword({ "lives" }, StdModule.say, { npcHandler = npcHandler, text = "Yes... YES... friendship... lives... now third word?" }) -keywordHandler:addKeyword({ "forever" }, StdModule.say, { npcHandler = npcHandler, text = "Yes... YES... friendship... lives... FOREVER ... And say hello... to... my old friend... Omrabas. " }) +npcHandler:setMessage(MESSAGE_GREET, "... ... hello...magic... words?") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/zedrulon_the_fallen.lua b/data-otservbr-global/npc/zedrulon_the_fallen.lua index c3708a2df3f..96974f7bc67 100644 --- a/data-otservbr-global/npc/zedrulon_the_fallen.lua +++ b/data-otservbr-global/npc/zedrulon_the_fallen.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua b/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua index ad737b276d3..548c08569c1 100644 --- a/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua +++ b/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua @@ -90,7 +90,7 @@ function adventurersStone.onUse(player, item, fromPosition, target, toPosition, return false end - player:setStorageValue(Storage.AdventurersGuild.Stone, townId) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone, townId) playerPos:sendMagicEffect(CONST_ME_TELEPORT) local destination = Position(32210, 32300, 6) diff --git a/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua b/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua index 49ee623762e..ff415fb9e26 100644 --- a/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua +++ b/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua @@ -3,11 +3,11 @@ local magicDoor = Action() function magicDoor.onUse(player, item, fromPosition, target, toPosition, isHotkey) local playerPos, destination = player:getPosition() if item.itemid == 17318 then - player:setStorageValue(Storage.AdventurersGuild.MagicDoor, 1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.MagicDoor, 1) destination = Position(32292, 32293, 7) else - if player:getStorageValue(Storage.AdventurersGuild.MagicDoor) == 1 then - player:setStorageValue(Storage.AdventurersGuild.MagicDoor, -1) + if player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.MagicDoor) == 1 then + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.MagicDoor, -1) destination = Position(32199, 32309, 7) elseif playerPos.x == 32293 then destination = Position(32297, 32293, 7) diff --git a/data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua b/data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua deleted file mode 100644 index b43f674af30..00000000000 --- a/data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua +++ /dev/null @@ -1,24 +0,0 @@ -local config = { - boss = { - name = "Mazoran", - position = Position(33584, 32689, 14), - }, - - timeToDefeat = 30 * 60, - playerPositions = { - { pos = Position(33593, 32644, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32645, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32646, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32647, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32648, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33570, 32677, 14), - to = Position(33597, 32700, 14), - }, - exit = Position(33319, 32318, 13), -} - -local lever = BossLever(config) -lever:uid(1025) -lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua b/data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua deleted file mode 100644 index 65207dae0b4..00000000000 --- a/data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua +++ /dev/null @@ -1,24 +0,0 @@ -local config = { - boss = { - name = "Plagirath", - position = Position(33172, 31501, 13), - }, - - timeToDefeat = 30 * 60, - playerPositions = { - { pos = Position(33229, 31500, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31501, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31502, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31503, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31504, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33159, 31488, 13), - to = Position(33190, 31515, 13), - }, - exit = Position(33319, 32318, 13), -} - -local lever = BossLever(config) -lever:uid(1022) -lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua b/data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua deleted file mode 100644 index 4fc83e29aa0..00000000000 --- a/data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua +++ /dev/null @@ -1,30 +0,0 @@ -local config = { - boss = { - name = "Ragiaz", - position = Position(33481, 32334, 13), - }, - - timeToDefeat = 30 * 60, - playerPositions = { - { pos = Position(33456, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33457, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33458, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33459, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33460, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - }, - monsters = { - { name = "Death Dragon", pos = Position(33476, 32331, 13) }, - { name = "Death Dragon", pos = Position(33476, 32340, 13) }, - { name = "Death Dragon", pos = Position(33487, 32340, 13) }, - { name = "Death Dragon", pos = Position(33488, 32331, 13) }, - }, - specPos = { - from = Position(33468, 32319, 13), - to = Position(33495, 32347, 13), - }, - exit = Position(33319, 32318, 13), -} - -local lever = BossLever(config) -lever:uid(1023) -lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua b/data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua deleted file mode 100644 index 6e6f9348b87..00000000000 --- a/data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua +++ /dev/null @@ -1,24 +0,0 @@ -local config = { - boss = { - name = "Razzagorn", - position = Position(33422, 32467, 14), - }, - - timeToDefeat = 30 * 60, - playerPositions = { - { pos = Position(33386, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33387, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33388, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33389, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33390, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33407, 32453, 14), - to = Position(33439, 32481, 14), - }, - exit = Position(33319, 32318, 13), -} - -local lever = BossLever(config) -lever:uid(1024) -lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua b/data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua deleted file mode 100644 index 2a2305bfd52..00000000000 --- a/data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua +++ /dev/null @@ -1,24 +0,0 @@ -local config = { - boss = { - name = "Shulgrax", - position = Position(33485, 32786, 13), - }, - - timeToDefeat = 30 * 60, - playerPositions = { - { pos = Position(33434, 32785, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32786, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32787, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32788, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32789, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33474, 32775, 13), - to = Position(33496, 32798, 13), - }, - exit = Position(33319, 32318, 13), -} - -local lever = BossLever(config) -lever:uid(1028) -lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua b/data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua deleted file mode 100644 index 13cdb5766f8..00000000000 --- a/data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua +++ /dev/null @@ -1,24 +0,0 @@ -local config = { - boss = { - name = "Tarbaz", - position = Position(33459, 32844, 11), - }, - - timeToDefeat = 30 * 60, - playerPositions = { - { pos = Position(33418, 32849, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32850, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32851, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32852, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32853, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33447, 32832, 11), - to = Position(33473, 32856, 11), - }, - exit = Position(33319, 32318, 13), -} - -local lever = BossLever(config) -lever:uid(1027) -lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua b/data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua deleted file mode 100644 index 94c7d59c0b2..00000000000 --- a/data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua +++ /dev/null @@ -1,33 +0,0 @@ -local config = { - boss = { - name = "Zamulosh", - position = Position(33643, 32756, 11), - }, - - timeToDefeat = 30 * 60, - playerPositions = { - { pos = Position(33680, 32741, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33680, 32742, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33680, 32743, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33680, 32744, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33680, 32745, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33632, 32747, 11), - to = Position(33654, 32765, 11), - }, - exit = Position(33319, 32318, 13), -} - -local zamuloshSummons = { - Position(33642, 32756, 11), - Position(33642, 32756, 11), - Position(33642, 32756, 11), - Position(33644, 32756, 11), - Position(33644, 32756, 11), - Position(33644, 32756, 11), -} - -local lever = BossLever(config) -lever:uid(1026) -lever:register() diff --git a/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua b/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua index e8dbf007312..e045cd294f2 100644 --- a/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua +++ b/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua @@ -7,23 +7,23 @@ function moonlightCrystals.onUse(player, item, fromPosition, target, toPosition, item:remove(1) return true elseif target.itemid == 22062 then - if (player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 0) or (player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 1) then + if (player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 0) or (player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 1) then target:remove() -- Magic level helmet player:addItem(24783, 1) item:remove(1) - elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 2 then + elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 2 then target:remove() -- Paladin helmet player:addItem(22132, 1) item:remove(1) - elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 3 then + elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 3 then target:remove() -- Knight club player:addItem(22128, 1) item:remove(1) - elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 4 then + elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 4 then target:remove() -- Knight axe player:addItem(22130, 1) item:remove(1) - elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 5 then + elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 5 then target:remove() -- Knight sword player:addItem(22129, 1) item:remove(1) diff --git a/data-otservbr-global/scripts/actions/other/construction_kits.lua b/data-otservbr-global/scripts/actions/other/construction_kits.lua index 1af8967cf27..20571165f92 100644 --- a/data-otservbr-global/scripts/actions/other/construction_kits.lua +++ b/data-otservbr-global/scripts/actions/other/construction_kits.lua @@ -62,31 +62,31 @@ local jackToTheFuture_Kits = { itemId = 2374, kitMessage = "The red cushioned chair looks quite comfy in that corner.", jackSay = "Jack: Yeah uhm... impressive chair. Now would you please remove it? Thanks.", - storage = Storage.TibiaTales.JackFutureQuest.Furniture01, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture01, }, [2797] = { itemId = 2979, kitMessage = "A globe like this should be in every household.", jackSay = "Jack: What the... what do I need a 'globe' for? Take this away.", - storage = Storage.TibiaTales.JackFutureQuest.Furniture02, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture02, }, [2799] = { itemId = 3485, kitMessage = "The telescope just looks like it was the one thing missing from this room.", jackSay = "Jack: Nice, a... what is this actually?", - storage = Storage.TibiaTales.JackFutureQuest.Furniture03, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture03, }, [2800] = { itemId = 2998, kitMessage = "What a cute horse - and just the right thing to place into this cute room.", jackSay = "Jack: A rocking horse? What's wrong with you.", - storage = Storage.TibiaTales.JackFutureQuest.Furniture04, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture04, }, [2805] = { itemId = 2904, kitMessage = "There seems to be no better place for this amphora than right here.", jackSay = "Jack: Trying to get rid of your junk in my house? Do I look like I need such a... 'vase'?", - storage = Storage.TibiaTales.JackFutureQuest.Furniture05, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture05, }, } @@ -99,7 +99,7 @@ local constructionKit = Action() function constructionKit.onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getPosition():isInRange(jackToTheFuture_House.beginPos, jackToTheFuture_House.finalPos) then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then local setting = jackToTheFuture_Kits[item.itemid] if setting then if player:getStorageValue(setting.storage) < 1 then diff --git a/data-otservbr-global/scripts/actions/other/destroy.lua b/data-otservbr-global/scripts/actions/other/destroy.lua index 2898b400e0d..2767044644e 100644 --- a/data-otservbr-global/scripts/actions/other/destroy.lua +++ b/data-otservbr-global/scripts/actions/other/destroy.lua @@ -25,7 +25,7 @@ function destroy.onUse(player, item, fromPosition, target, toPosition, isHotkey) if toPosition == Position(scimitarPos.x, scimitarPos.y, scimitarPos.z) then local scimitarPlaced = Tile(scimitarPos):getItemById(placedSimitarItemId) if not scimitarPlaced then - if player:getStorageValue(Storage.TibiaTales.AritosTask) >= 0 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) >= 0 then item:remove() Game.createItem(placedSimitarItemId, 1, scimitarPos) addEvent(removeEntrance, 1 * 60 * 1000) diff --git a/data-otservbr-global/scripts/actions/other/gems.lua b/data-otservbr-global/scripts/actions/other/gems.lua index 19441552c2c..e56ea30e896 100644 --- a/data-otservbr-global/scripts/actions/other/gems.lua +++ b/data-otservbr-global/scripts/actions/other/gems.lua @@ -34,10 +34,10 @@ local shrine = { local lionsRock = { [25006] = { - itemId = 21442, + itemId = 21441, itemPos = { x = 33069, y = 32298, z = 9 }, - storage = Storage.LionsRock.Questline, - value = 9, + storage = Storage.Quest.U10_70.LionsRock.Questline, + value = 6, item = 3030, fieldId = 2123, message = "You place the ruby on the small socket. A red flame begins to burn.", @@ -46,8 +46,8 @@ local lionsRock = { [25007] = { itemId = 21442, itemPos = { x = 33069, y = 32302, z = 9 }, - storage = Storage.LionsRock.Questline, - value = 9, + storage = Storage.Quest.U10_70.LionsRock.Questline, + value = 7, item = 3029, fieldId = 21463, message = "You place the sapphire on the small socket. A blue flame begins to burn.", @@ -56,8 +56,8 @@ local lionsRock = { [25008] = { itemId = 21440, itemPos = { x = 33077, y = 32302, z = 9 }, - storage = Storage.LionsRock.Questline, - value = 9, + storage = Storage.Quest.U10_70.LionsRock.Questline, + value = 8, item = 3033, fieldId = 7465, message = "You place the amethyst on the small socket. A violet flame begins to burn.", @@ -66,7 +66,7 @@ local lionsRock = { [25009] = { itemId = 21437, itemPos = { x = 33077, y = 32298, z = 9 }, - storage = Storage.LionsRock.Questline, + storage = Storage.Quest.U10_70.LionsRock.Questline, value = 9, item = 9057, fieldId = 21465, @@ -76,7 +76,13 @@ local lionsRock = { } local gems = Action() + function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local questStorage = player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) + if questStorage == 10 or questStorage == 11 then + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, 6) + end + -- Small emerald for Kilmaresh quest -- see data\scripts\quests\kilmaresh\1-fafnars-wrath\7-four-masks.lua if item.itemid == 3032 and target.uid == 40032 and player:getStorageValue(Storage.Kilmaresh.Sixth.Favor) >= 1 and not testFlag(player:getStorageValue(Storage.Kilmaresh.Sixth.FourMasks), 4) then @@ -127,7 +133,7 @@ function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) local function lionsRockFieldReset() local gemSpot = Tile(setting.itemPos):getItemById(setting.fieldId) if gemSpot then - Game.setStorageValue(GlobalStorage.LionsRockFields, Game.getStorageValue(GlobalStorage.LionsRockFields) - 1) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields, player:getStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields) - 1) gemSpot:remove() return true end @@ -135,7 +141,7 @@ function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) -- Check if all lion's fields are set local function checkLionsRockFields(storage) - if Game.getStorageValue(GlobalStorage.LionsRockFields) == 3 then + if player:getStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields) == 3 then local stone = Tile(lionsRockSanctuaryPos):getItemById(lionsRockSanctuaryRockId) if stone then stone:transform(lionsRockSanctuaryFountainId) @@ -152,31 +158,31 @@ function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) local gemSpot = Tile(itemPos):getItemById(fieldId) if not gemSpot then Game.createItem(fieldId, 1, itemPos) - Game.setStorageValue(GlobalStorage.LionsRockFields, Game.getStorageValue(GlobalStorage.LionsRockFields) + 1) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields, player:getStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields) + 1) checkLionsRockFields(storage) return true end end - if player:getStorageValue(setting.storage) >= setting.value then + if player:getStorageValue(setting.storage) == setting.value then if setting.item == item.itemid then local gemSpot = Tile(setting.itemPos):getItemById(setting.fieldId) if not gemSpot then toPosition:sendMagicEffect(setting.effect) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message) item:remove(1) + player:setStorageValue(setting.storage, setting.value + 1) addEvent(lionsRockCreateField, 2 * 1000, setting.itemPos, setting.fieldId, setting.storage) addEvent(lionsRockFieldReset, 60 * 1000) return true end end end + return false end for index, value in pairs(shrine) do gems:id(index) end - -gems:id(9057) gems:register() 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 1fc69647305..a187810b3bc 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua @@ -9,17 +9,11 @@ local config = { needItem = { itemId = 3231 }, effect = CONST_ME_MAGIC_BLUE, }, - [2286] = { - items = { - { itemId = 3205 }, - }, - storage = Storage.QuestChests.FamilyBrooch, - }, [3018] = { items = { { itemId = 3219 }, }, - storage = Storage.Postman.Mission08, + storage = Storage.Quest.U7_24.ThePostmanMissions.Mission08, formerValue = 1, newValue = 2, }, @@ -66,7 +60,7 @@ local config = { items = { { itemId = 3217 }, }, - storage = Storage.Postman.Mission09, + storage = Storage.Quest.U7_24.ThePostmanMissions.Mission09, formerValue = 1, newValue = 2, }, @@ -74,7 +68,7 @@ local config = { items = { { itemId = 3218 }, }, - storage = Storage.Postman.Mission05, + storage = Storage.Quest.U7_24.ThePostmanMissions.Mission05, formerValue = 1, newValue = 2, }, @@ -98,7 +92,7 @@ local config = { items = { { itemId = 2972, actionId = 3980 }, }, - storage = Storage.QuestChests.DeeperFibulaKey, + storage = Storage.Quest.U5_0.DeeperFibulaKey, }, [9226] = { items = { @@ -298,7 +292,7 @@ The map shows the original floor plan of this mine. You recognise your position (In the lower right corner someone scribbled a note how to use the hoist on the first mine floor.)]], }, }, - storage = Storage.QuestChests.FormorgarMinesHoistSkeleton, + storage = Storage.Quest.U8_0.TheIceIslands.FormorgarMinesHoistSkeleton, }, [14041] = { items = { @@ -357,7 +351,7 @@ the parchment is destroyed. It seems that is was torn by a big paw ...]], }, }, - storage = Storage.LionsRock.OuterSanctum.Skeleton, + storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.Skeleton, }, -- 65203 reservado } diff --git a/data-otservbr-global/scripts/actions/tools/skinning.lua b/data-otservbr-global/scripts/actions/tools/skinning.lua index 2461dfb7e80..a35929db054 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.Questline) == 1 then + elseif target.itemid == 10735 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.Quest.U8_6.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.Questline, 2) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 2) return true - elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 2 then + elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.Quest.U8_6.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.Questline, 3) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 3) return true elseif target.itemid == 8181 and player:getStorageValue(789100) <= 1 then player:say("You got Neutral matter.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/valuables/random_items.lua b/data-otservbr-global/scripts/actions/valuables/random_items.lua index f91dcf4f15a..9e62086a972 100644 --- a/data-otservbr-global/scripts/actions/valuables/random_items.lua +++ b/data-otservbr-global/scripts/actions/valuables/random_items.lua @@ -103,6 +103,24 @@ local config = { }, effect = CONST_ME_BUBBLES, }, + [21333] = { -- Belongings of a Deceased (The Ravager) - Dark Trails Quest + chances = { + { from = 1, to = 2500, itemId = 3043 }, -- crystal coins + { from = 2501, to = 5000, itemId = 3041 }, -- blue gem + { from = 5001, to = 7500, itemId = 3038 }, -- green gem + { from = 7501, to = 10001, itemId = 3331 }, -- ravager's axe + }, + effect = CONST_ME_MAGIC_GREEN, + }, + [21334] = { -- Belongings of a Deceased (Death Priest Shargon) - Dark Trails Quest + chances = { + { from = 1, to = 2500, itemId = 3043 }, -- crystal coins + { from = 2501, to = 5000, itemId = 5741 }, -- skull helmet + { from = 5001, to = 7500, itemId = 3324 }, -- skull staff + { from = 7501, to = 10001, itemId = 9056 }, -- black skull + }, + effect = CONST_ME_MAGIC_GREEN, + }, [22763] = { -- shaggy ogre bag chances = { { from = 1, to = 1440, itemId = 22187, count = 5 }, diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index 8b87cb8a336..bf0e1430635 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -238,8 +238,8 @@ local questTable = { { 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 = Storage.Quest.U8_1.TibiaTales.DefaultStart, storageValue = 1 }, + { storage = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 }, { storage = 12450, storageValue = 6 }, { storage = 12330, storageValue = 1 }, { storage = 12332, storageValue = 13 }, @@ -263,8 +263,8 @@ local questTable = { { storage = Storage.Quest.U7_6.TheApeCity.Started, storageValue = 1 }, { storage = Storage.Quest.U7_6.TheApeCity.Questline, storageValue = 18 }, { storage = Storage.BanutaSecretTunnel.DeeperBanutaShortcut, storageValue = 1 }, - { storage = Storage.Oramond.QuestLine, storageValue = 1 }, - { storage = Storage.Oramond.MissionToTakeRoots, storageValue = 3000 }, + { storage = Storage.Quest.U10_50.OramondQuest.QuestLine, storageValue = 1 }, + { storage = Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, storageValue = 3000 }, { storage = Storage.DangerousDepths.Questline, storageValue = 1 }, { storage = Storage.DangerousDepths.Dwarves.Home, storageValue = 2 }, { storage = Storage.DangerousDepths.Dwarves.Subterranean, storageValue = 2 }, @@ -276,10 +276,10 @@ local questTable = { { storage = Storage.Quest.U11_40.ThreatenedDreams.QuestLine, storageValue = 1 }, { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission01[1], storageValue = 16 }, { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission02.KroazurAccess, storageValue = 1 }, - { storage = Storage.AdventurersGuild.QuestLine, storageValue = 1 }, - { storage = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, storageValue = 1 }, - { storage = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, storageValue = 2 }, - { storage = Storage.AdventurersGuild.TheLostBrother, storageValue = 3 }, + { storage = Storage.Quest.U9_80.AdventurersGuild.QuestLine, storageValue = 1 }, + { storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 1 }, + { storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 2 }, + { storage = Storage.Quest.U10_80.TheLostBrotherQuest, storageValue = 3 }, { storage = Storage.Quest.U10_55.Dawnport.Questline, storageValue = 1 }, { storage = Storage.Quest.U10_55.Dawnport.GoMain, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessDeath, storageValue = 1 }, @@ -288,8 +288,8 @@ local questTable = { { storage = Storage.ForgottenKnowledge.AccessFire, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessIce, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessGolden, storageValue = 1 }, - { storage = Storage.Quest.U10_80.Grimvale.AncientFeudDoors, storageValue = 1 }, - { storage = Storage.Quest.U10_80.Grimvale.AncientFeudShortcut, storageValue = 1 }, + { storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudDoors, storageValue = 1 }, + { storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudShortcut, storageValue = 1 }, { storage = Storage.Kilmaresh.AccessDoor, storageValue = 1 }, { storage = Storage.Kilmaresh.CatacombDoors, storageValue = 1 }, { storage = Storage.Quest.U12_00.TheDreamCourts.AccessDoors, storageValue = 1 }, @@ -310,12 +310,12 @@ local questTable = { { storage = Storage.CultsOfTibia.Misguided.AccessDoor, storageValue = 1 }, { storage = Storage.CultsOfTibia.FinalBoss.AccessDoor, storageValue = 1 }, - { storage = Storage.FerumbrasAscension.FirstDoor, storageValue = 1 }, - { storage = Storage.FerumbrasAscension.MonsterDoor, storageValue = 1 }, - { storage = Storage.FerumbrasAscension.TarbazDoor, storageValue = 1 }, - { storage = Storage.FerumbrasAscension.HabitatsAccess, storageValue = 1 }, - { storage = Storage.FerumbrasAscension.TheLordOfTheLiceAccess, storageValue = 1 }, - { storage = Storage.FerumbrasAscension.Statue, storageValue = 1 }, + { storage = Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, storageValue = 1 }, + { storage = Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, storageValue = 1 }, + { storage = Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor, storageValue = 1 }, + { storage = Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess, storageValue = 1 }, + { storage = Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceAccess, storageValue = 1 }, + { storage = Storage.Quest.U10_90.FerumbrasAscension.Statue, storageValue = 1 }, { storage = Storage.Quest.U12_00.TheDreamCourts.AndrewDoor, storageValue = 1 }, @@ -361,7 +361,7 @@ local questTable = { -- Assassin Outfit quests { storage = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, storageValue = 0 }, - { storage = Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, storageValue = 2 }, + { storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, storageValue = 2 }, -- Hunter Outfit quests { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, storageValue = 1 }, @@ -383,10 +383,10 @@ local questTable = { { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, storageValue = 2 }, --The White Raven Monastery - { storage = Storage.WhiteRavenMonastery.QuestLog, storageValue = 1 }, - { storage = Storage.WhiteRavenMonastery.Passage, storageValue = 1 }, - { storage = Storage.WhiteRavenMonastery.Diary, storageValue = 2 }, - { storage = Storage.WhiteRavenMonastery.Door, storageValue = 1 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, storageValue = 1 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, storageValue = 1 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, storageValue = 2 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, storageValue = 1 }, } -- from Position: (33201, 31762, 1) diff --git a/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua b/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua index 7000a36bc34..af5b0e80fd7 100644 --- a/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua +++ b/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua @@ -39,8 +39,8 @@ local function resetGlobalStorages() end local function resetFerumbrasAscendantQuestHabitats() - for i = 1, #GlobalStorage.FerumbrasAscendant.Habitats do - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats[i], 0) + for i = 1, #Storage.Quest.U10_90.FerumbrasAscension.Habitats do + Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats[i], 0) end end diff --git a/data-otservbr-global/scripts/lib/register_actions.lua b/data-otservbr-global/scripts/lib/register_actions.lua index 6118f3b837a..ebb77654882 100644 --- a/data-otservbr-global/scripts/lib/register_actions.lua +++ b/data-otservbr-global/scripts/lib/register_actions.lua @@ -215,27 +215,13 @@ local cutItems = { -- Ferumbras ascendant ring reward local function addFerumbrasAscendantReward(player, target, toPosition) - local stonePos = Position(32648, 32134, 10) - if toPosition == stonePos then - local tile = Tile(stonePos) - local stone = tile:getItemById(1772) - if stone then - stone:remove(1) - toPosition:sendMagicEffect(CONST_ME_POFF) - addEvent(function() - Game.createItem(1772, 1, stonePos) - end, 20000) - return true - end - end - if target.itemid == 22872 and target.actionid == 53803 then - if player:getStorageValue(Storage.FerumbrasAscension.Ring) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring) >= 1 then return false end player:addItem(22170, 1) - player:setStorageValue(Storage.FerumbrasAscension.Ring, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring, 1) end end @@ -264,9 +250,9 @@ function onDestroyItem(player, item, fromPosition, target, toPosition, isHotkey) if math.random(1, 80) <= (watt and watt > 10 and watt or 10) then -- Against The Spider Cult (Spider Eggs) if target.itemid == 233 then - local eggStorage = player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) + local eggStorage = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) if eggStorage >= 1 and eggStorage < 5 then - player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1) end Game.createMonster("Giant Spider", Position(33181, 31869, 12)) @@ -368,6 +354,27 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) return true end + local specificPositions = { + { pos = Position(33064, 32435, 10), storage = Storage.Quest.U10_10.TheGravediggerOfDrefia.SmallDragonTears1 }, + { pos = Position(33061, 32428, 10), storage = Storage.Quest.U10_10.TheGravediggerOfDrefia.SmallDragonTears2 }, + { pos = Position(33065, 32423, 10), storage = Storage.Quest.U10_10.TheGravediggerOfDrefia.SmallDragonTears3 }, + } + for i = 1, #specificPositions do + local data = specificPositions[i] + if toPosition == data.pos and player:getStorageValue(data.storage) < 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14) == 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a small dragon tear. You pocket it quickly.") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + player:addItem(19084, 1) + player:setStorageValue(data.storage, 1) + return true + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You find nothing of interest.") + return true + end + end + end + if table.contains(holes, target.itemid) then target:transform(target.itemid + 1) target:decay() @@ -403,17 +410,17 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALSQUARE) target:transform(594) addEvent(revertItem, 30 * 1000, toPosition, 594, 7749) - elseif target.actionid == 4654 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) < 1 then + elseif target.actionid == 4654 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) < 1 then -- Gravedigger Quest player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a piece of the scroll. You pocket it quickly.") player:getPosition():sendMagicEffect(CONST_ME_POFF) player:addItem(18933, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission50, 1) - elseif target.actionid == 4668 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50, 1) + elseif target.actionid == 4668 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A torn scroll piece emerges. Probably gnawed off by rats.") player:getPosition():sendMagicEffect(CONST_ME_POFF) player:addItem(18933, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission70, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71, 2) elseif target.actionid == 50118 then local wagonItem = Tile(Position(32717, 31492, 11)):getItemById(7131) if wagonItem then @@ -458,7 +465,7 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) end end elseif target.itemid == 103 and target.actionid == 4205 then - if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) ~= 1 then return false end @@ -581,7 +588,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) end elseif target.itemid == 22075 then -- Grimvale quest - if player:getStorageValue(Storage.Grimvale.SilverVein) < os.time() then + if player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.SilverVein) < os.time() then local chance = math.random(1, 10) if chance >= 5 then player:sendTextMessage( @@ -599,7 +606,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) target:transform(4464) addEvent(revertItem, 10 * 60 * 1000, toPosition, 4464, 22075) end - player:setStorageValue(Storage.Grimvale.SilverVein, os.time() + 2 * 60) + player:setStorageValue(Storage.Quest.U10_80.GrimvaleQuest.SilverVein, os.time() + 2 * 60) else player:sendTextMessage( MESSAGE_EVENT_ADVANCE, @@ -701,7 +708,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) end elseif target.actionid == 50127 then -- Pythius The Rotten (Firewalker Boots) - if player:getStorageValue(Storage.QuestChests.FirewalkerBoots) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.FirewalkerBoots) == 1 then return false end target:remove(1) @@ -738,37 +745,35 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) target:decay() elseif target.itemid == 2071 then -- Jack to the Future Quest - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) ~= 1 then return false end if toPosition == Position(33277, 31754, 7) then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) == 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) == 1 then target:transform(2066) toPosition:sendMagicEffect(CONST_ME_POFF) player:addItem(10426, 1) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Statue, 2) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) + 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue, 2) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) + 1) addEvent(revertItem, 2 * 60 * 1000, { x = 33277, y = 31754, z = 7 }, 2066, 2071) end end - else - return false - end - if (target ~= nil) and target:isItem() and (target:getId() == 20135) then - --Lower Roshamuul - if math.random(100) > 50 then + elseif target.itemid == 20135 then + local chance = math.random(100) + if chance > 50 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone produces some fine gravel.") target:transform(20133) - target:decay() else Game.createMonster("Frazzlemaw", toPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone yields nothing but slightly finer, yet still unusable rubber.") target:transform(20134) - target:decay() end - return true + target:decay() + else + return false end + return true end @@ -847,8 +852,8 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) elseif target.actionid == 100 then if target.itemid == 3501 then -- Postman quest - if player:getStorageValue(Storage.Postman.Mission02) == 1 then - player:setStorageValue(Storage.Postman.Mission02, 2) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 1 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 2) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) end elseif target:getActionId() == 40041 and target.itemid == 4848 then diff --git a/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua b/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua index 95d408b82d3..46a657f6f15 100644 --- a/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua +++ b/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua @@ -6,10 +6,10 @@ function adventurersGuild.onStepIn(creature, item, position, fromPosition) return true end - local townId = player:getStorageValue(Storage.AdventurersGuild.Stone) + local townId = player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone) local destination = townId ~= -1 and Town(townId):getTemplePosition() or player:getTown():getTemplePosition() - player:setStorageValue(Storage.AdventurersGuild.Stone, -1) + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone, -1) player:teleportTo(destination) position:sendMagicEffect(CONST_ME_TELEPORT) destination:sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua b/data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua deleted file mode 100644 index 7d4535efbf1..00000000000 --- a/data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua +++ /dev/null @@ -1,28 +0,0 @@ -local roshamuulCaves = { - Position(33560, 32523, 8), - Position(33554, 32543, 8), - Position(33573, 32545, 8), - Position(33543, 32560, 8), - Position(33579, 32565, 8), - Position(33527, 32597, 8), -} - -local lowerRoshamuul = MoveEvent() - -function lowerRoshamuul.onStepIn(creature, item, position, fromPosition) - if not creature:isPlayer() then - return false - end - - if item:getId() == 20122 then - creature:teleportTo(Position(33551, 32556, 7)) - else - creature:teleportTo(roshamuulCaves[math.random(#roshamuulCaves)]) - end - return true -end - -lowerRoshamuul:type("stepin") -lowerRoshamuul:id(20122) -lowerRoshamuul:aid(1500) -lowerRoshamuul:register() diff --git a/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua index 0e320c18445..89c8028a3db 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua @@ -1,10 +1,10 @@ local darkCorpse = Action() function darkCorpse.onUse(player) - if player:getStorageValue(Storage.DarkTrails.Mission14) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Quandon has been murdered! You should report to Sholley about it!.") - player:setStorageValue(Storage.DarkTrails.Mission14, 2) - elseif player:getStorageValue(Storage.DarkTrails.Mission14) == 2 then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14, 2) + elseif player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) == 2 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is empty!") end return true diff --git a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua index b107ae2e449..8114701729e 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua @@ -1,63 +1,75 @@ local setting = { - centerRoom = { x = 33487, y = 32111, z = 9 }, + centerRoom = Position(33487, 32111, 9), range = 10, playerPositions = { - { x = 33583, y = 31844, z = 10 }, - { x = 33584, y = 31844, z = 10 }, - { x = 33585, y = 31844, z = 10 }, - { x = 33586, y = 31844, z = 10 }, - { x = 33587, y = 31844, z = 10 }, + Position(33583, 31844, 10), + Position(33584, 31844, 10), + Position(33585, 31844, 10), + Position(33586, 31844, 10), + Position(33587, 31844, 10), }, newPositions = { - { x = 33486, y = 32120, z = 9 }, - { x = 33486, y = 32120, z = 9 }, - { x = 33486, y = 32120, z = 9 }, - { x = 33486, y = 32120, z = 9 }, - { x = 33486, y = 32120, z = 9 }, + Position(33486, 32120, 9), + Position(33486, 32120, 9), + Position(33486, 32120, 9), + Position(33486, 32120, 9), + Position(33486, 32120, 9), }, minionPositions = { - { x = 33482, y = 32105, z = 9 }, - { x = 33484, y = 32105, z = 9 }, - { x = 33484, y = 32107, z = 9 }, - { x = 33481, y = 32109, z = 9 }, - { x = 33482, y = 32111, z = 9 }, - { x = 33488, y = 32106, z = 9 }, - { x = 33490, y = 32106, z = 9 }, - { x = 33492, y = 32109, z = 9 }, - { x = 33492, y = 32112, z = 9 }, - { x = 33490, y = 32112, z = 9 }, + Position(33482, 32105, 9), + Position(33484, 32105, 9), + Position(33484, 32107, 9), + Position(33481, 32109, 9), + Position(33482, 32111, 9), + Position(33488, 32106, 9), + Position(33490, 32106, 9), + Position(33492, 32109, 9), + Position(33492, 32112, 9), + Position(33490, 32112, 9), }, } local leverDeathPriestShargon = Action() + function leverDeathPriestShargon.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 2772 then if roomIsOccupied(setting.centerRoom, false, setting.range, setting.range) then - player:say("Someone is fighting against the boss! You need wait awhile.", TALKTYPE_MONSTER_SAY) + player:say("Someone is fighting against the boss! You need to wait awhile.", TALKTYPE_MONSTER_SAY) return true end - local storePlayers, playerTile = {} + local storePlayers = {} for i = 1, #setting.playerPositions do - local creature = Tile(setting.playerPositions[i]):getTopCreature() + local tile = Tile(setting.playerPositions[i]) + local creature = tile and tile:getTopCreature() if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need 5 of players to fight with Death Priest Shargon.") + player:sendCancelMessage("You need 5 players to fight with Death Priest Shargon.") return true end - storePlayers[#storePlayers + 1] = playerTile + storePlayers[#storePlayers + 1] = creature + end + + if #storePlayers < 5 then + player:sendCancelMessage("You need exactly 5 players to fight with Death Priest Shargon.") + return true end - for i = 1, #config.minionPositions do - Game.createMonster("greater death minion", config.minionPositions[i]) + for i = 1, #setting.minionPositions do + Game.createMonster("greater death minion", setting.minionPositions[i]) end - Game.createMonster("death priest shargon", { x = 33487, y = 32108, z = 9 }) + Game.createMonster("death priest shargon", Position(33487, 32108, 9)) - local players for i = 1, #storePlayers do - players = storePlayers[i] - config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) - players:teleportTo(config.newPositions[i]) - config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA) + local playerToTeleport = storePlayers[i] + local oldPosition = setting.playerPositions[i] + local newPosition = setting.newPositions[i] + if Tile(oldPosition) then + oldPosition:sendMagicEffect(CONST_ME_POFF) + end + if newPosition then + playerToTeleport:teleportTo(newPosition) + newPosition:sendMagicEffect(CONST_ME_ENERGYAREA) + end end item:transform(2773) elseif item.itemid == 2773 then diff --git a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua index 1e76aef4112..1f26e32afc5 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua @@ -8,10 +8,10 @@ local setting = { Position(33420, 32102, 10), }, newPositions = { - Position(33487, 32088, 8), - Position(33487, 32088, 8), - Position(33487, 32088, 8), - Position(33487, 32088, 8), + Position(33487, 32087, 8), + Position(33487, 32087, 8), + Position(33487, 32087, 8), + Position(33487, 32087, 8), }, canopicJarPositions = { Position(33486, 32081, 8), @@ -22,33 +22,33 @@ local setting = { } local leverTheRavager = Action() + function leverTheRavager.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 2772 then if roomIsOccupied(setting.centerRoom, false, setting.range, setting.range) then - player:say("Someone is fighting against the boss! You need wait awhile.", TALKTYPE_MONSTER_SAY) + player:say("Someone is fighting against the boss! You need to wait awhile.", TALKTYPE_MONSTER_SAY) return true end - local storePlayers, playerTile = {} + local storePlayers = {} for i = 1, #setting.playerPositions do local creature = Tile(setting.playerPositions[i]):getTopCreature() if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need 4 of players to fight with The Ravager.") + player:sendCancelMessage("You need 4 players to fight with The Ravager.") return true end - storePlayers[#storePlayers + 1] = playerTile + storePlayers[#storePlayers + 1] = creature end for i = 1, #setting.canopicJarPositions do Game.createMonster("greater canopic jar", setting.canopicJarPositions[i]) end - Game.createMonster("the ravager", { x = 33487, y = 32108, z = 9 }) + Game.createMonster("the ravager", { x = 33487, y = 32079, z = 8 }) - local players for i = 1, #storePlayers do - players = storePlayers[i] + local playerToTeleport = storePlayers[i] setting.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) - players:teleportTo(setting.newPositions[i]) + playerToTeleport:teleportTo(setting.newPositions[i]) setting.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA) end item:transform(2773) diff --git a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua index 1cd88f5243c..445e6299f37 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua @@ -1,10 +1,10 @@ local config = { teleportId = 1949, - teleportPosition = { x = 33487, y = 32101, z = 9 }, + teleportPosition = Position(33487, 32101, 9), destinationPosition = Position(33489, 32088, 9), - storageKey = Storage.DarkTrails.Mission18, + storageKey = Storage.Quest.U10_50.DarkTrails.Mission18, getStorageValue = 1, - setStorageValue = 2, + setStorageValue = 1, } local function removeTeleport(position) @@ -15,7 +15,8 @@ local function removeTeleport(position) end end -local deathPriestShargon = CreatureEvent("ShargonDeath") +local deathPriestShargon = CreatureEvent("DeathPriestShargonDeath") + function deathPriestShargon.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) local position = creature:getPosition() position:sendMagicEffect(CONST_ME_TELEPORT) @@ -23,6 +24,7 @@ function deathPriestShargon.onDeath(creature, _corpse, _lastHitKiller, mostDamag if item:isTeleport() then item:setDestination(config.destinationPosition) end + onDeathForParty(creature, mostDamageKiller, function(creature, player) if config.storageKey ~= nil then if player:getStorageValue(config.storageKey) < config.getStorageValue then @@ -30,6 +32,7 @@ function deathPriestShargon.onDeath(creature, _corpse, _lastHitKiller, mostDamag end end end) + addEvent(removeTeleport, 5 * 60 * 1000, position) return true end diff --git a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua index f11bfa41efe..9a88a6673dc 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua @@ -15,8 +15,8 @@ function theRavager.onDeath(creature) item:setDestination(Position(33459, 32083, 8)) end onDeathForDamagingPlayers(creature, function(creature, player) - if player:getStorageValue(Storage.DarkTrails.Mission11) < 1 then - player:setStorageValue(Storage.DarkTrails.Mission11, 1) + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission11) < 1 then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission11, 1) end end) addEvent(removeTeleport, 5 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua b/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua index f8868485128..c057adb33f4 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua @@ -6,13 +6,14 @@ function necrometerTileAccess.onStepIn(creature, item, position, fromPosition) return false end - if player:getStorageValue(Storage.DarkTrails.Mission04) == 1 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A strange ritual has taken place here. Report about it to the Gloot Brothers.") - player:setStorageValue(Storage.DarkTrails.Mission05, 1) -- Start mission 5 - elseif player:getStorageValue(Storage.DarkTrails.Mission10) >= 1 and player:getItemCount(21124) > 0 then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05, 1) -- Start mission 5 + elseif player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10) >= 1 and player:getItemCount(21124) > 0 then player:teleportTo({ x = 33419, y = 32106, z = 10 }) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The necrometer reveals a hidden passage!") end + return true end diff --git a/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua b/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua index 9178cc1e376..7ba64c68470 100644 --- a/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua +++ b/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua @@ -1,6 +1,6 @@ local config = { - [11589] = { itemId = 11550, storage = Storage.FathersBurden.Corpse.Scale, text = "Glitterscale's scale." }, - [11590] = { itemId = 11548, storage = Storage.FathersBurden.Corpse.Sinew, text = "Heoni's sinew" }, + [11589] = { itemId = 11550, storage = Storage.Quest.U8_6.AFathersBurden.Corpse.Scale, text = "Glitterscale's scale." }, + [11590] = { itemId = 11548, storage = Storage.Quest.U8_6.AFathersBurden.Corpse.Sinew, text = "Heoni's sinew" }, } local fatherCorpse = Action() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua deleted file mode 100644 index c259b308c0b..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua +++ /dev/null @@ -1,86 +0,0 @@ -local config = AscendingFerumbrasConfig - -local function clearFerumbrasRoom() - local spectators = Game.getSpectators(config.bossPos, false, false, 20, 20, 20, 20) - for i = 1, #spectators do - local spectator = spectators[i] - if spectator:isPlayer() then - spectator:teleportTo(config.exitPosition) - spectator:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - spectator:say("Time out! You were teleported out by strange forces.", TALKTYPE_MONSTER_SAY) - elseif spectator:isMonster() then - spectator:remove() - end - end -end - -local ferumbrasAscendantLever = Action() -function ferumbrasAscendantLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= config.leverPos then - return true - end - - for x = 33269, 33271 do - for y = 31477, 31481 do - local playerTile = Tile(Position(x, y, 14)):getTopCreature() - if playerTile and playerTile:isPlayer() then - if not playerTile:canFightBoss("Ferumbras Mortal Shell") then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You or a member in your team have to wait %d days to face Ferumbras again!", config.days)) - item:transform(8912) - return true - end - end - end - end - - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "There's someone fighting with Ferumbras.") - return true - end - end - - local spectators = Game.getSpectators(config.bossPos, false, false, 15, 15, 15, 15) - for i = 1, #spectators do - local spectator = spectators[i] - if spectator:isMonster() then - spectator:remove() - end - end - - for x = 33269, 33271 do - for y = 31477, 31481 do - local playerTile = Tile(Position(x, y, 14)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPos) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setBossCooldown("Ferumbras Mortal Shell", os.time() + config.days * 24 * 3600) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have %d minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.", config.time)) - addEvent(clearFerumbrasRoom, config.time * 60 * 1000, player:getId(), config.centerRoom, config.range, config.range, config.exitPosition) - - for b = 1, config.maxSummon do - local xrand = math.random(-10, 10) - local yrand = math.random(-10, 10) - local position = Position(33392 + xrand, 31473 + yrand, 14) - if not Game.createMonster(config.summonName, position) then - logger.error("[ferumbrasAscendantLever.onUse] can't create monster {}, on position {}", config.summonName, position:toString()) - end - end - - Game.createMonster(config.bossName, config.bossPos, true, true) - item:transform(8912) - end - end - end - elseif item.itemid == 8912 then - item:transform(8911) - return true - end -end - -ferumbrasAscendantLever:uid(1021) -ferumbrasAscendantLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua deleted file mode 100644 index 6c9a1b7db9c..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua +++ /dev/null @@ -1,49 +0,0 @@ -local config = { - centerRoom = Position(33215, 31456, 12), - BossPosition = Position(33220, 31460, 12), - playerPositions = { - Position(33197, 31475, 11), - Position(33198, 31475, 11), - Position(33199, 31475, 11), - Position(33200, 31475, 11), - Position(33201, 31475, 11), - }, - newPosition = Position(33215, 31470, 12), -} - -local ferumbrasAscendantRatLever = Action() -function ferumbrasAscendantRatLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33201, 31475, 11) then - item:transform(8912) - return true - end - end - if item.itemid == 8911 then - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Lord of The Lice.") - return true - end - end - Game.createMonster("the lord of the lice", config.BossPosition, true, true) - for x = 33197, 33201 do - local playerTile = Tile(Position(x, 31475, 11)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - end - end - addEvent(clearForgotten, 30 * 60 * 1000, Position(33187, 31429, 12), Position(33242, 31487, 12), Position(33319, 32318, 13)) - item:transform(8912) - elseif item.itemid == 8912 then - item:transform(8911) - end - return true -end - -ferumbrasAscendantRatLever:uid(1030) -ferumbrasAscendantRatLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua deleted file mode 100644 index 5ee308349da..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua +++ /dev/null @@ -1,51 +0,0 @@ -local config = { - centerRoom = Position(33406, 32418, 14), - BossPosition = Position(33406, 32418, 14), - playerPositions = { - Position(33403, 32465, 13), - Position(33404, 32465, 13), - Position(33405, 32465, 13), - Position(33406, 32465, 13), - Position(33407, 32465, 13), - }, - newPosition = Position(33398, 32414, 14), -} - -local ferumbrasAscendantTheShattererLever = Action() -function ferumbrasAscendantTheShattererLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33403, 32465, 13) then - item:transform(8912) - return true - end - end - if item.itemid == 8911 then - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Shatterer.") - return true - end - end - Game.createMonster("The Shatterer", config.BossPosition, true, true) - for x = 33403, 33407 do - local playerTile = Tile(Position(x, 32465, 13)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - end - end - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, 0) - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererTimer, 1) - addEvent(clearForgotten, 30 * 60 * 1000, Position(33377, 32390, 14), Position(33446, 32447, 14), Position(33319, 32318, 13), Storage.FerumbrasAscension.TheShattererTimer) - item:transform(8912) - elseif item.itemid == 8912 then - item:transform(8911) - end - return true -end - -ferumbrasAscendantTheShattererLever:uid(1029) -ferumbrasAscendantTheShattererLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua deleted file mode 100644 index 8993c4b9063..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua +++ /dev/null @@ -1,76 +0,0 @@ -local bosses = { - ["the lord of the lice"] = { teleportPos = Position(33226, 31478, 12), godbreakerPos = Position(33237, 31477, 13) }, - ["tarbaz"] = { teleportPos = Position(33460, 32853, 11), godbreakerPos = Position(33427, 32852, 13) }, - ["ragiaz"] = { teleportPos = Position(33482, 32345, 13), godbreakerPos = Position(33466, 32392, 13) }, - ["plagirath"] = { teleportPos = Position(33174, 31511, 13), godbreakerPos = Position(33204, 31510, 13) }, - ["razzagorn"] = { teleportPos = Position(33357, 32434, 12), godbreakerPos = Position(33357, 32440, 13) }, - ["zamulosh"] = { teleportPos = Position(33644, 32764, 11), godbreakerPos = Position(33678, 32758, 13) }, - ["mazoran"] = { teleportPos = Position(33585, 32699, 14), godbreakerPos = Position(33614, 32679, 15) }, - ["shulgrax"] = { teleportPos = Position(33486, 32796, 13), godbreakerPos = Position(33459, 32820, 14) }, - ["ferumbras mortal shell"] = { teleportPos = Position(33392, 31485, 14), godbreakerPos = Position(33388, 31414, 14) }, -} - -local crystals = { - [1] = { crystalPosition = Position(33390, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal1 }, - [2] = { crystalPosition = Position(33394, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal2 }, - [3] = { crystalPosition = Position(33397, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal3 }, - [4] = { crystalPosition = Position(33397, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal4 }, - [5] = { crystalPosition = Position(33394, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal5 }, - [6] = { crystalPosition = Position(33390, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal6 }, - [7] = { crystalPosition = Position(33387, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal7 }, - [8] = { crystalPosition = Position(33387, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal8 }, -} -local function transformCrystal() - for c = 1, #crystals do - local crystal = crystals[c] - Game.getStorageValue(crystal.globalStorage, 0) - Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals, 0) - local item = Tile(crystal.crystalPosition):getItemById(14961) - if item then - item:transform(14955) - end - end -end - -local function revertTeleport(position, itemId, transformId, destination) - local item = Tile(position):getItemById(itemId) - if item then - item:transform(transformId) - item:setDestination(destination) - end -end - -local ascendantBossesKill = CreatureEvent("AscendantBossesDeath") -function ascendantBossesKill.onDeath(creature) - local bossConfig = bosses[creature:getName():lower()] - if not bossConfig then - return true - end - - onDeathForDamagingPlayers(creature, function(creature, player) - if creature:getName():lower() == "ferumbras mortal shell" then - player:setBossCooldown(creature:getName(), os.time() + AscendingFerumbrasConfig.days * 24 * 3600) - elseif creature:getName():lower() == "the lord of the lice" then - player:setStorageValue(Storage.FerumbrasAscension.TheLordOfTheLiceAccess, 1) - end - end) - - local teleport = Tile(bossConfig.teleportPos):getItemById(1949) - if not teleport then - return true - end - - if teleport then - teleport:transform(22761) - creature:getPosition():sendMagicEffect(CONST_ME_THUNDER) - teleport:setDestination(bossConfig.godbreakerPos) - addEvent(revertTeleport, 2 * 60 * 1000, bossConfig.teleportPos, 22761, 1949, Position(33319, 32318, 13)) - end - - if creature:getName():lower() == "ferumbras mortal shell" then - addEvent(transformCrystal, 2 * 60 * 1000) - end - return true -end - -ascendantBossesKill:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua deleted file mode 100644 index 812cfff1421..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua +++ /dev/null @@ -1,36 +0,0 @@ -local config = { - [24830] = { storage = Storage.FerumbrasAscension.Razzagorn }, - [24831] = { storage = Storage.FerumbrasAscension.Ragiaz }, - [24832] = { storage = Storage.FerumbrasAscension.Zamulosh }, - [24833] = { storage = Storage.FerumbrasAscension.Mazoran }, - [24834] = { storage = Storage.FerumbrasAscension.Tarbaz }, - [24835] = { storage = Storage.FerumbrasAscension.Shulgrax }, - [24836] = { storage = Storage.FerumbrasAscension.Plagirath }, -} - -local bossTeleport = MoveEvent() - -function bossTeleport.onStepIn(creature, item, position, fromPosition) - local teleport = config[item.actionid] - if not teleport then - return false - end - local player = creature:getPlayer() - if not player then - return true - end - if player:getStorageValue(teleport.storage) == 1 then - local position = player:getPosition() - position.z = position.z - 1 - player:teleportTo(position) - end - return true -end - -bossTeleport:type("stepin") - -for index, value in pairs(config) do - bossTeleport:aid(index) -end - -bossTeleport:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua deleted file mode 100644 index 63c79aa5d44..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua +++ /dev/null @@ -1,18 +0,0 @@ -local desperateSoul = MoveEvent() - -function desperateSoul.onStepIn(creature, item, position, fromPosition) - local monster = creature:getMonster() - if not monster or monster:getName():lower() ~= "desperate soul" then - return true - end - - monster:remove() - position:sendMagicEffect(CONST_ME_POFF) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence, 1) - addEvent(Game.setStorageValue, 2 * 60 * 1000, GlobalStorage.FerumbrasAscendant.FerumbrasEssence, 0) - return true -end - -desperateSoul:type("stepin") -desperateSoul:aid(54390) -desperateSoul:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute.lua similarity index 86% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute.lua index def47cc49ca..33b9604a7d2 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute.lua @@ -3,7 +3,7 @@ function ferumbrasAscendantBoneFlute.onUse(player, item, fromPosition, target, t if target:isItem() then return false end - if player:getStorageValue(Storage.FerumbrasAscension.BoneFlute) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFlute) >= 1 then return false end if not target:getPosition():isInRange(Position(33477, 32775, 11), Position(33493, 32781, 11)) then @@ -13,7 +13,7 @@ function ferumbrasAscendantBoneFlute.onUse(player, item, fromPosition, target, t local rand = math.random(100) if rand <= 5 then player:say("Finally this one reveal your spirit animal.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.FerumbrasAscension.BoneFlute, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFlute, 1) item:remove() return true elseif rand > 5 and rand <= 50 then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute_wall.lua similarity index 70% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute_wall.lua index 53350db1f4f..f69efcb46a7 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute_wall.lua @@ -1,8 +1,8 @@ local ferumbrasAscendantBoneWall = Action() function ferumbrasAscendantBoneWall.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.FerumbrasAscension.BoneFluteWall) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFluteWall) < 1 then player:addItem(22254) - player:setStorageValue(Storage.FerumbrasAscension.BoneFluteWall, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFluteWall, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bone flute.") toPosition:sendMagicEffect(CONST_ME_THUNDER) else diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_boots_of_homecoming.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_boots_of_homecoming.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_boots_of_homecoming.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_boots_of_homecoming.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_color_levers.lua similarity index 57% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_color_levers.lua index 8607f99b4cb..6ef051008a9 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_color_levers.lua @@ -1,37 +1,37 @@ local ferumbrasAscendantColorLevers = Action() function ferumbrasAscendantColorLevers.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.FerumbrasAscension.FirstDoor) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor) >= 1 then item:transform(item.itemid == 9125 and 9126 or 9125) return true end if item.actionid == 54381 then - if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) < 1 then local rand = math.random(4) - player:setStorageValue(Storage.FerumbrasAscension.ColorLever, rand) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever, rand) player:getPosition():sendMagicEffect(166 + rand) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You choose the colour of decay.") end elseif item.actionid == 54382 then - if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 1 then - player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 1 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end elseif item.actionid == 54383 then - if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 3 then - player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 3 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end elseif item.actionid == 54384 then - if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 4 then - player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 4 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end elseif item.actionid == 54385 then - if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 2 then - player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 2 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_amulet.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_amulet.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_amulet.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_amulet.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua new file mode 100644 index 00000000000..161aaafb3e7 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua @@ -0,0 +1,104 @@ +local config = { + boss = { + name = "Ferumbras Mortal Shell", + position = Position(33392, 31473, 14), + }, + playerPositions = { + { pos = Position(33269, 31477, 14), teleport = Position(33390, 31483, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33374, 31458, 14), + to = Position(33414, 31498, 14), + }, + exit = Position(33319, 32318, 13), + centerRoom = Position(33392, 31473, 14), + summonName = "Rift Fragment", + maxSummon = 3, +} + +local leverFerumbras = Action() + +function leverFerumbras.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position, true, true) + for b = 1, config.maxSummon do + local xrand = math.random(-5, 5) + local yrand = math.random(-5, 5) + local position = Position(config.boss.position.x + xrand, config.boss.position.y + yrand, config.boss.position.z) + Game.createMonster(config.summonName, position) + end + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverFerumbras:uid(1021) +leverFerumbras:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_mana_keg.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_mana_keg.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_mana_keg.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_mana_keg.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_flower_puzzle_lever.lua similarity index 88% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_flower_puzzle_lever.lua index 6cc91c9d45a..d09178c1504 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_flower_puzzle_lever.lua @@ -25,6 +25,7 @@ local function revertItem(position, itemId, transformId) end local ferumbrasAscendantFlowerPuzzle = Action() + function ferumbrasAscendantFlowerPuzzle.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9110 then for a = 1, #flowerPositions do @@ -34,11 +35,13 @@ function ferumbrasAscendantFlowerPuzzle.onUse(player, item, fromPosition, target return true end end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer) >= 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The portal still activated.") else - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer, 1) - addEvent(Game.setStorageValue, 30 * 1000, GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer, 1) + addEvent(function() + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer, 0) + end, 30 * 1000) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A portal forms as two beams of a strange construction dividing this room move towards each other.") for x = 33475, 33479 do local pos = Position(x, 32698, 14) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_grave_flower.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_grave_flower.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_grave_flower.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_grave_flower.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_corrupted.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_corrupted.lua index 74a93dbf5a9..1977a0e8826 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_corrupted.lua @@ -340,6 +340,7 @@ local corrupted = { { itemid = 417, position = Position(33614, 32721, 12) }, { itemid = 417, position = Position(33611, 32712, 12) }, } + local function transformArea() for x = 33611, 33625 do for y = 32712, 32727 do @@ -374,10 +375,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatCorrupted = Action() + function ferumbrasAscendantHabitatCorrupted.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Corrupted) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -389,12 +403,12 @@ function ferumbrasAscendantHabitatCorrupted.onUse(player, item, fromPosition, ta basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Corrupted, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) local basin = Tile(Position(33628, 32721, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_desert.lua similarity index 93% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_desert.lua index e5b8e22f150..d6ebadee7fe 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_desert.lua @@ -354,10 +354,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatDesert = Action() + function ferumbrasAscendantHabitatDesert.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Desert) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -369,12 +382,12 @@ function ferumbrasAscendantHabitatDesert.onUse(player, item, fromPosition, targe basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Desert, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) local basin = Tile(Position(33631, 32685, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_dimension.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_dimension.lua index 1fc14c6646f..94884e25a70 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_dimension.lua @@ -390,10 +390,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatDimension = Action() + function ferumbrasAscendantHabitatDimension.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -405,12 +418,12 @@ function ferumbrasAscendantHabitatDimension.onUse(player, item, fromPosition, ta basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) local basin = Tile(Position(33631, 32721, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_grass.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_grass.lua index 293e65844cc..ce7f6d329ae 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_grass.lua @@ -422,10 +422,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatGlass = Action() + function ferumbrasAscendantHabitatGlass.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Grass) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -437,12 +450,12 @@ function ferumbrasAscendantHabitatGlass.onUse(player, item, fromPosition, target basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Grass, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) local basin = Tile(Position(33631, 32667, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_ice.lua similarity index 95% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_ice.lua index b46a984a00e..21560098721 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_ice.lua @@ -437,10 +437,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatIce = Action() + function ferumbrasAscendantHabitatIce.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Ice) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -452,12 +465,12 @@ function ferumbrasAscendantHabitatIce.onUse(player, item, fromPosition, target, basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Ice, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) local basin = Tile(Position(33631, 32703, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_lever.lua similarity index 68% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_lever.lua index f44bc549603..653deb4683d 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_lever.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantHabitatLever = Action() function ferumbrasAscendantHabitatLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.FerumbrasAscension.HabitatsAccess) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess) >= 1 then return false end if item.itemid == 9125 then - player:setStorageValue(Storage.FerumbrasAscension.HabitatsAccess, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess, 1) item:transform(9126) elseif item.itemid == 9126 then item:transform(9125) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_mushroom.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_mushroom.lua index 52b0c9b7ac7..cbcc87dccb5 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_mushroom.lua @@ -390,10 +390,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatMushroom = Action() + function ferumbrasAscendantHabitatMushroom.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Mushroom) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -405,12 +418,12 @@ function ferumbrasAscendantHabitatMushroom.onUse(player, item, fromPosition, tar basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Mushroom, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) local basin = Tile(Position(33628, 32685, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_roshamuul.lua similarity index 95% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_roshamuul.lua index 42da59f0e93..a234295469d 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_roshamuul.lua @@ -463,10 +463,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatRoshamuul = Action() + function ferumbrasAscendantHabitatRoshamuul.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Roshamuul) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -478,12 +491,12 @@ function ferumbrasAscendantHabitatRoshamuul.onUse(player, item, fromPosition, ta basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Roshamuul, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) local basin = Tile(Position(33628, 32667, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_venom.lua similarity index 95% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_venom.lua index 2649da5694e..0b0f6783f96 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_venom.lua @@ -413,6 +413,7 @@ local venom = { { itemid = 1059, position = Position(33625, 32709, 12) }, { itemid = 417, position = Position(33625, 32709, 12) }, } + local function transformArea() for x = 33611, 33625 do for y = 32694, 32709 do @@ -445,10 +446,23 @@ local function transformArea() return true end +local function resetFerumbrasAscendantHabitats(player) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) +end + local ferumbrasAscendantHabitatVenom = Action() + function ferumbrasAscendantHabitatVenom.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Venom) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -460,14 +474,14 @@ function ferumbrasAscendantHabitatVenom.onUse(player, item, fromPosition, target basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Venom, 1) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then addEvent(function() local basin = Tile(Position(33628, 32703, 12)):getItemById(22196) if basin then - resetFerumbrasAscendantHabitats() + resetFerumbrasAscendantHabitats(player) basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(11114) end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_first.lua similarity index 64% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_first.lua index 000dfdf9f6d..bfda089df67 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_first.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLeverFirst = Action() function ferumbrasAscendantLeverFirst.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 1 then - local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 1 then + local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -17,8 +17,8 @@ function ferumbrasAscendantLeverFirst.onUse(player, item, fromPosition, target, revertStorages() return true end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 1 then - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 2) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 1 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Something clicked.") end item:transform(9111) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_four.lua similarity index 58% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_four.lua index 637384e90b5..f267c9cd1e7 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_four.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLevelFour = Action() function ferumbrasAscendantLevelFour.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 4 then - local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 4 then + local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -16,8 +16,8 @@ function ferumbrasAscendantLevelFour.onUse(player, item, fromPosition, target, t revertStorages() return true end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 4 then - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 4) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 4 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 4) end item:transform(9111) elseif item.itemid == 9111 then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_second.lua similarity index 65% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_second.lua index d1c93f33aeb..af68fb44b42 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_second.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLeverSecond = Action() function ferumbrasAscendantLeverSecond.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 2 then - local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 2 then + local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -17,8 +17,8 @@ function ferumbrasAscendantLeverSecond.onUse(player, item, fromPosition, target, revertStorages() return true end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 2 then - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 3) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 2 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 3) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Something clicked.") end item:transform(9111) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_third.lua similarity index 62% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_third.lua index 589abecd5a1..2626112bd8e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_third.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLeverThird = Action() function ferumbrasAscendantLeverThird.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 3 then - local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 3 then + local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -17,17 +17,17 @@ function ferumbrasAscendantLeverThird.onUse(player, item, fromPosition, target, revertStorages() return true end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four) == 4 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four) == 4 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A booming sound almost deafens you. From somewhere deep within you hear a whisper: 'Blood...'") end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four) == 5 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four) == 5 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A booming sound almost deafens you. From somewhere deep within you hear a whisper: 'Grass...'") end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four) == 6 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four) == 6 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A booming sound almost deafens you. From somewhere deep within you hear a whisper: 'Ice...'") end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 3 then - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 4) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 3 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 4) end item:transform(9111) elseif item.itemid == 9111 then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua new file mode 100644 index 00000000000..56cda9fb65b --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua @@ -0,0 +1,105 @@ +local config = { + boss = { + name = "Mazoran", + position = Position(33584, 32689, 14), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33593, 32644, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32645, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32646, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32647, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32648, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33570, 32677, 14), + to = Position(33597, 32700, 14), + }, + exit = Position(33319, 32318, 13), +} + +local leverMazoran = Action() + +function leverMazoran.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + local boss = Game.createMonster(config.boss.name, config.boss.position) + if boss then + boss:setReward(true) + end + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverMazoran:uid(1025) +leverMazoran:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mysterious_scroll.lua similarity index 72% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mysterious_scroll.lua index 88bf697f907..bcef5b7b69c 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mysterious_scroll.lua @@ -1,12 +1,12 @@ local ferumbrasAscendantMysterious = Action() function ferumbrasAscendantMysterious.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.FerumbrasAscension.RiftRunner) >= 1 or player:getStorageValue(24850) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RiftRunner) >= 1 or player:getStorageValue(24850) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "No matter how often you try, you cannot decipher anything.") return true else player:addMount(87) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You decipher something! You get a rift runner to accompany you on your journey.") - player:setStorageValue(Storage.FerumbrasAscension.RiftRunner, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RiftRunner, 1) end return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua new file mode 100644 index 00000000000..b49a0d58db8 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua @@ -0,0 +1,102 @@ +local config = { + boss = { + name = "Plagirath", + position = Position(33172, 31501, 13), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33229, 31500, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31501, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31502, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31503, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31504, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33159, 31488, 13), + to = Position(33190, 31515, 13), + }, + exit = Position(33319, 32318, 13), +} + +local leverPlagirath = Action() + +function leverPlagirath.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position) + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverPlagirath:uid(1022) +leverPlagirath:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_purified_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_purified_soul.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_purified_soul.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_purified_soul.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua new file mode 100644 index 00000000000..cbe9d13ba35 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua @@ -0,0 +1,114 @@ +local config = { + boss = { + name = "Ragiaz", + position = Position(33481, 32334, 13), + }, + + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33456, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33457, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33458, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33459, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33460, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + }, + monsters = { + { name = "Death Dragon", pos = Position(33476, 32331, 13) }, + { name = "Death Dragon", pos = Position(33476, 32340, 13) }, + { name = "Death Dragon", pos = Position(33487, 32340, 13) }, + { name = "Death Dragon", pos = Position(33488, 32331, 13) }, + }, + specPos = { + from = Position(33468, 32319, 13), + to = Position(33495, 32347, 13), + }, + exit = Position(33319, 32318, 13), +} + +local leverRagiaz = Action() + +function leverRagiaz.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position) + + for i = 1, #config.monsters do + local monsterConfig = config.monsters[i] + Game.createMonster(monsterConfig.name, monsterConfig.pos, true, true) + end + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverRagiaz:uid(1023) +leverRagiaz:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua new file mode 100644 index 00000000000..13ef7bb84e2 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua @@ -0,0 +1,102 @@ +local config = { + boss = { + name = "The Lord of The Lice", + position = Position(33220, 31460, 12), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33197, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, + { pos = Position(33198, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, + { pos = Position(33199, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, + { pos = Position(33200, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, + { pos = Position(33201, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33187, 31429, 12), + to = Position(33242, 31487, 12), + }, + exit = Position(33319, 32318, 13), +} + +local ferumbrasAscendantRatLever = Action() + +function ferumbrasAscendantRatLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position) + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local bossRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() and creature:getName() == bossName then + creature:remove() + bossRemoved = true + end + end + end + end + end + return bossRemoved +end + +ferumbrasAscendantRatLever:uid(1030) +ferumbrasAscendantRatLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua new file mode 100644 index 00000000000..c24ec5d2e37 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua @@ -0,0 +1,102 @@ +local config = { + boss = { + name = "Razzagorn", + position = Position(33422, 32467, 14), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33386, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33387, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33388, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33389, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33390, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33407, 32453, 14), + to = Position(33439, 32481, 14), + }, + exit = Position(33319, 32318, 13), +} + +local leverRazzagorn = Action() + +function leverRazzagorn.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position) + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverRazzagorn:uid(1024) +leverRazzagorn:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_reward.lua similarity index 88% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_reward.lua index 4c751de9af0..c353a4cc089 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_reward.lua @@ -14,7 +14,7 @@ function ferumbrasAscendantReward.onUse(player, item, fromPosition, target, toPo if item.itemid ~= 4073 then return false end - if player:getStorageValue(Storage.FerumbrasAscension.Reward) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Reward) >= 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The treasure chest is empty.") return true end @@ -34,7 +34,7 @@ function ferumbrasAscendantReward.onUse(player, item, fromPosition, target, toPo end return true end - player:setStorageValue(Storage.FerumbrasAscension.Reward, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Reward, 1) return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_sacrifice.lua similarity index 60% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_sacrifice.lua index cf69d4dc968..16f7cae78b9 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_sacrifice.lua @@ -7,35 +7,35 @@ local fount = { local ferumbrasAscendantSacrifice = Action() function ferumbrasAscendantSacrifice.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if not target.actionid == 53805 or Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.FerumbrasAscension.Fount) >= 4 then + if not target.actionid == 53805 or Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) >= 4 then return false end if item.itemid == 22158 then - if player:getStorageValue(Storage.FerumbrasAscension.Bone) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Bone) >= 1 then player:say("You already put the bones on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.FerumbrasAscension.Bone, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Bone, 1) elseif item.itemid == 22170 then - if player:getStorageValue(Storage.FerumbrasAscension.Ring2) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring2) >= 1 then player:say("You already put the signet ring on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.FerumbrasAscension.Ring2, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring2, 1) elseif item.itemid == 9685 then - if player:getStorageValue(Storage.FerumbrasAscension.Vampire) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Vampire) >= 1 then player:say("You already put the vampire teeth on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.FerumbrasAscension.Vampire, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Vampire, 1) elseif item.itemid == 3661 then - if player:getStorageValue(Storage.FerumbrasAscension.Flower) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Flower) >= 1 then player:say("You already put the grave flower on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.FerumbrasAscension.Flower, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Flower, 1) end - if player:getStorageValue(Storage.FerumbrasAscension.Fount) == 3 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) == 3 then for i = 1, #fount do local fount = fount[i] local founts = Tile(fount.pos):getItemById(fount.revert) @@ -47,10 +47,10 @@ function ferumbrasAscendantSacrifice.onUse(player, item, fromPosition, target, t statue:transform(22161) end end - if player:getStorageValue(Storage.FerumbrasAscension.Fount) < 0 then - player:setStorageValue(Storage.FerumbrasAscension.Fount, 0) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) < 0 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount, 0) end - player:setStorageValue(Storage.FerumbrasAscension.Fount, player:getStorageValue(Storage.FerumbrasAscension.Fount) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You put the " .. item:getName() .. " into the dried well.") toPosition:sendMagicEffect(CONST_ME_DRAWBLOOD) item:remove(1) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua new file mode 100644 index 00000000000..43f5029a6ac --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua @@ -0,0 +1,102 @@ +local config = { + boss = { + name = "Shulgrax", + position = Position(33485, 32786, 13), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33434, 32785, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32786, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32787, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32788, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32789, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33474, 32775, 13), + to = Position(33496, 32798, 13), + }, + exit = Position(33319, 32318, 13), +} + +local leverShulgrax = Action() + +function leverShulgrax.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position) + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverShulgrax:uid(1028) +leverShulgrax:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_statue.lua similarity index 80% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_statue.lua index 65040b79df9..b7181eaa171 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_statue.lua @@ -7,7 +7,7 @@ local fount = { local ferumbrasAscendantStatue = Action() function ferumbrasAscendantStatue.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.FerumbrasAscension.Fount) < 4 or player:getStorageValue(Storage.FerumbrasAscension.Statue) >= 1 then + if Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) < 4 or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Statue) >= 1 then return false end for i = 1, #fount do @@ -17,7 +17,7 @@ function ferumbrasAscendantStatue.onUse(player, item, fromPosition, target, toPo founts:setActionId(53805) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You douse the sacred statue's flame. The room darkens.") - player:setStorageValue(Storage.FerumbrasAscension.Statue, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Statue, 1) item:transform(22163) return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua new file mode 100644 index 00000000000..dfda8c76e8d --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua @@ -0,0 +1,102 @@ +local config = { + boss = { + name = "Tarbaz", + position = Position(33459, 32844, 11), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33418, 32849, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32850, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32851, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32852, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32853, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33447, 32832, 11), + to = Position(33473, 32856, 11), + }, + exit = Position(33319, 32318, 13), +} + +local leverTarbaz = Action() + +function leverTarbaz.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position) + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverTarbaz:uid(1027) +leverTarbaz:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz_notes.lua similarity index 61% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz_notes.lua index 4dea9d21e2c..60a1bf2fc2e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz_notes.lua @@ -1,17 +1,17 @@ local ferumbrasAscendantTarbazNotes = Action() function ferumbrasAscendantTarbazNotes.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.actionid == 54388 then - if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) ~= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) ~= 8 then return false end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Suddenly, you see the big picture. It all makes sense now. And then you despair.") - player:setStorageValue(Storage.FerumbrasAscension.TarbazNotes, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazNotes, 1) elseif item.actionid == 54389 then - if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) ~= 8 and player:getStorageValue(Storage.FerumbrasAscension.TarbazNotes) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) ~= 8 and player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazNotes) < 1 then return false end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Suddenly, you see the latter A. It all makes sense now. And then you now the secret.") - player:setStorageValue(Storage.FerumbrasAscension.TarbazNotes, 2) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazNotes, 2) end toPosition:sendMagicEffect(CONST_ME_THUNDER) return true diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_teleportation_rod.lua similarity index 59% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_teleportation_rod.lua index 062233e7eb7..1f1f2f32e40 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_teleportation_rod.lua @@ -1,14 +1,15 @@ local config = { - [22174] = { storageKey = Storage.FerumbrasAscension.Razzagorn }, - [22175] = { storageKey = Storage.FerumbrasAscension.Ragiaz }, - [22176] = { storageKey = Storage.FerumbrasAscension.Zamulosh }, - [22177] = { storageKey = Storage.FerumbrasAscension.Mazoran }, - [22178] = { storageKey = Storage.FerumbrasAscension.Tarbaz }, - [22179] = { storageKey = Storage.FerumbrasAscension.Shulgrax }, - [22180] = { storageKey = Storage.FerumbrasAscension.Plagirath }, + [22174] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn }, + [22175] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz }, + [22176] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh }, + [22177] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Mazoran }, + [22178] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz }, + [22179] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax }, + [22180] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Plagirath }, } local ferumbrasAscendantTeleportation = Action() + function ferumbrasAscendantTeleportation.onUse(player, item, fromPosition, target, toPosition, isHotkey) local targetItem = config[target.itemid] if not targetItem then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua new file mode 100644 index 00000000000..221a4bdc850 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua @@ -0,0 +1,112 @@ +local config = { + boss = { + name = "The Shatterer", + position = Position(33406, 32418, 14), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33403, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33404, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33405, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33406, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33407, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33377, 32390, 14), + to = Position(33446, 32447, 14), + }, + exit = Position(33319, 32318, 13), + centerRoom = Position(33406, 32418, 14), + storage = { + lever = Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, + timer = Storage.Quest.U10_90.FerumbrasAscension.TheShattererTimer, + }, +} + +local ferumbrasAscendantTheShattererLever = Action() + +function ferumbrasAscendantTheShattererLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Shatterer.") + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position, true, true) + + for _, participant in pairs(players) do + participant:setStorageValue(config.storage.lever, 0) + participant:setStorageValue(config.storage.timer, 1) + end + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit, config.storage.timer) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local bossRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() and creature:getName() == bossName then + creature:remove() + bossRemoved = true + end + end + end + end + end + return bossRemoved +end + +ferumbrasAscendantTheShattererLever:uid(1029) +ferumbrasAscendantTheShattererLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_levers.lua similarity index 80% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_levers.lua index d97d8c4bccc..b7e7916ebdf 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_levers.lua @@ -40,7 +40,7 @@ local chains = { local ferumbrasAscendantTheShattererLevers = Action() function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.FerumbrasAscension.TheShatterer) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShatterer) >= 1 then player:sendCancelMessage("You cannot use this lever again.") return true end @@ -55,8 +55,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, Game.createMonster("Fury", { x = player:getPosition().x + math.random(-3, 3), y = player:getPosition().y + math.random(-3, 3), z = player:getPosition().z }) end end - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) - if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) @@ -73,8 +73,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, Game.createMonster("Destroyer", { x = player:getPosition().x + math.random(-3, 3), y = player:getPosition().y + math.random(-3, 3), z = player:getPosition().z }) end end - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) - if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) @@ -90,8 +90,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, bla:remove() end end - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) - if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) @@ -107,8 +107,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, bla:remove() end end - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) - if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua new file mode 100644 index 00000000000..74e7740bc9f --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua @@ -0,0 +1,116 @@ +local config = { + boss = { + name = "Zamulosh", + position = Position(33643, 32756, 11), + }, + timeToDefeat = 17 * 60, -- 17 minutes in seconds + playerPositions = { + { pos = Position(33680, 32741, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33632, 32747, 11), + to = Position(33654, 32765, 11), + }, + exit = Position(33319, 32318, 13), + summons = { + Position(33642, 32756, 11), + Position(33642, 32756, 11), + Position(33642, 32756, 11), + Position(33644, 32756, 11), + Position(33644, 32756, 11), + Position(33644, 32756, 11), + }, +} + +local leverZamulosh = Action() + +function leverZamulosh.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) + return true + end + end + + if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then + player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) + return true + end + + local players = {} + for i = 1, #config.playerPositions do + local pos = config.playerPositions[i].pos + local creature = Tile(pos):getTopCreature() + if not creature or not creature:isPlayer() then + player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") + return true + end + table.insert(players, creature) + end + + for i = 1, #players do + local playerToTeleport = players[i] + local teleportPos = config.playerPositions[i].teleport + local effect = config.playerPositions[i].effect + playerToTeleport:teleportTo(teleportPos) + teleportPos:sendMagicEffect(effect) + end + + Game.createMonster(config.boss.name, config.boss.position) + + local zamuloshIndex = math.random(#config.summons) + + for i, summonPos in ipairs(config.summons) do + if i == zamuloshIndex then + Game.createMonster(config.boss.name, summonPos) + else + Game.createMonster("Zamulosh3", summonPos) + end + end + + addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) + + if item.itemid == 8911 then + item:transform(8912) + else + item:transform(8911) + end + + return true +end + +function clearBossRoom(fromPos, toPos, exitPos) + local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) + for _, spec in pairs(spectators) do + if spec:isPlayer() then + spec:teleportTo(exitPos) + exitPos:sendMagicEffect(CONST_ME_TELEPORT) + spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") + else + spec:remove() + end + end +end + +function isBossInRoom(fromPos, toPos, bossName) + local monstersRemoved = false + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + for z = fromPos.z, toPos.z do + local tile = Tile(Position(x, y, z)) + if tile then + local creature = tile:getTopCreature() + if creature and creature:isMonster() then + creature:remove() + monstersRemoved = true + end + end + end + end + end + return monstersRemoved +end + +leverZamulosh:uid(1026) +leverZamulosh:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bone_capsule.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bone_capsule.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bone_capsule.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bone_capsule.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua new file mode 100644 index 00000000000..e01e22f1534 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua @@ -0,0 +1,135 @@ +local bosses = { + ["the lord of the lice"] = { + teleportPos = Position(33226, 31478, 12), + godbreakerPos = Position(33237, 31477, 13), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceTime, + }, + ["tarbaz"] = { + teleportPos = Position(33460, 32853, 11), + godbreakerPos = Position(33427, 32852, 13), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.TarbazTime, + }, + ["ragiaz"] = { + teleportPos = Position(33482, 32345, 13), + godbreakerPos = Position(33466, 32392, 13), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.RagiazTime, + }, + ["plagirath"] = { + teleportPos = Position(33174, 31511, 13), + godbreakerPos = Position(33204, 31510, 13), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.PlagirathTime, + }, + ["razzagorn"] = { + teleportPos = Position(33357, 32434, 12), + godbreakerPos = Position(33357, 32440, 13), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.RazzagornTime, + }, + ["zamulosh"] = { + teleportPos = Position(33644, 32764, 11), + godbreakerPos = Position(33678, 32758, 13), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTime, + }, + ["mazoran"] = { + teleportPos = Position(33585, 32699, 14), + godbreakerPos = Position(33614, 32679, 15), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.MazoranTime, + }, + ["shulgrax"] = { + teleportPos = Position(33486, 32796, 13), + godbreakerPos = Position(33459, 32820, 14), + cooldown = 44, -- hours + storage = Storage.Quest.U10_90.FerumbrasAscension.ShulgraxTime, + }, + ["ferumbras mortal shell"] = { + teleportPos = Position(33392, 31485, 14), + godbreakerPos = Position(33388, 31414, 14), + cooldown = 332, -- hours - 13 days and 20 hours + storage = Storage.Quest.U10_90.FerumbrasAscension.FerumbrasMortalShellTime, + }, +} + +local crystals = { + [1] = { crystalPosition = Position(33390, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1 }, + [2] = { crystalPosition = Position(33394, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2 }, + [3] = { crystalPosition = Position(33397, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3 }, + [4] = { crystalPosition = Position(33397, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4 }, + [5] = { crystalPosition = Position(33394, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5 }, + [6] = { crystalPosition = Position(33390, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6 }, + [7] = { crystalPosition = Position(33387, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7 }, + [8] = { crystalPosition = Position(33387, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8 }, +} + +local function transformCrystal(player) + for c = 1, #crystals do + local crystal = crystals[c] + player:setStorageValue(crystal.globalStorage, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, 0) + local item = Tile(crystal.crystalPosition):getItemById(14961) + if item then + item:transform(14955) + end + end +end + +local function revertTeleport(position, itemId, transformId, destination) + local item = Tile(position):getItemById(itemId) + if item then + item:transform(transformId) + item:setDestination(destination) + end +end + +local ascendantBossesKill = CreatureEvent("AscendantBossesDeath") + +local function formatCooldownMessage(cooldownHours) + local days = math.floor(cooldownHours / 24) + local hours = cooldownHours % 24 + if days > 0 then + return string.format("%d days and %d hours", days, hours) + else + return string.format("%d hours", hours) + end +end + +function ascendantBossesKill.onDeath(creature) + local bossConfig = bosses[creature:getName():lower()] + if not bossConfig then + return true + end + + onDeathForDamagingPlayers(creature, function(creature, player) + local bossName = creature:getName():lower() + if bossConfig.storage then + local cooldownTime = bossConfig.cooldown * 3600 + local nextAvailableTime = os.time() + cooldownTime + player:setStorageValue(bossConfig.storage, nextAvailableTime) + local cooldownMessage = formatCooldownMessage(bossConfig.cooldown) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have defeated " .. bossName .. ". You can challenge this boss again in " .. cooldownMessage .. ".") + end + end) + + local teleport = Tile(bossConfig.teleportPos):getItemById(1949) + if teleport then + teleport:transform(22761) + teleport:getPosition():sendMagicEffect(CONST_ME_THUNDER) + teleport:setDestination(bossConfig.godbreakerPos) + addEvent(revertTeleport, 1 * 60 * 1000, bossConfig.teleportPos, 22761, 1949, Position(33319, 32318, 13)) + end + + if creature:getName():lower() == "ferumbras mortal shell" then + onDeathForDamagingPlayers(creature, function(creature, player) + addEvent(transformCrystal, 2 * 60 * 1000, player) + end) + end + + return true +end + +ascendantBossesKill:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_death_dragon.lua similarity index 87% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_death_dragon.lua index 2f952dd81d8..bc9fe4c5197 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_death_dragon.lua @@ -9,7 +9,7 @@ function deathDragon.onDeath(creature, corpse, lasthitkiller, mostdamagekiller, return true end - local spectators = Game.getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) + local spectators = player:getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) for i = 1, #spectators do local spectator = spectators[i] if spectator:isMonster() and spectator:getName():lower() == "ragiaz" then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_disgusting_ooze_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_disgusting_ooze_death.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_disgusting_ooze_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_disgusting_ooze_death.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_mortal_shell_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_mortal_shell_death.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_mortal_shell_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_mortal_shell_death.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_soul_splinter.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_soul_splinter.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_soul_splinter.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_soul_splinter.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_rift_invader_death.lua similarity index 72% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_rift_invader_death.lua index 3db8456d1d1..ecd56ef0467 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_rift_invader_death.lua @@ -1,12 +1,12 @@ local crystals = { - [1] = { fromPosition = Position(33389, 31467, 14), toPosition = Position(33391, 31469, 14), crystalPosition = Position(33390, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal1 }, - [2] = { fromPosition = Position(33393, 31467, 14), toPosition = Position(33395, 31469, 14), crystalPosition = Position(33394, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal2 }, - [3] = { fromPosition = Position(33396, 31470, 14), toPosition = Position(33398, 31472, 14), crystalPosition = Position(33397, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal3 }, - [4] = { fromPosition = Position(33396, 31474, 14), toPosition = Position(33398, 31476, 14), crystalPosition = Position(33397, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal4 }, - [5] = { fromPosition = Position(33393, 31477, 14), toPosition = Position(33395, 31479, 14), crystalPosition = Position(33394, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal5 }, - [6] = { fromPosition = Position(33389, 31477, 14), toPosition = Position(33391, 31479, 14), crystalPosition = Position(33390, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal6 }, - [7] = { fromPosition = Position(33386, 31474, 14), toPosition = Position(33388, 31476, 14), crystalPosition = Position(33387, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal7 }, - [8] = { fromPosition = Position(33386, 31470, 14), toPosition = Position(33388, 31472, 14), crystalPosition = Position(33387, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal8 }, + [1] = { fromPosition = Position(33389, 31467, 14), toPosition = Position(33391, 31469, 14), crystalPosition = Position(33390, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1 }, + [2] = { fromPosition = Position(33393, 31467, 14), toPosition = Position(33395, 31469, 14), crystalPosition = Position(33394, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2 }, + [3] = { fromPosition = Position(33396, 31470, 14), toPosition = Position(33398, 31472, 14), crystalPosition = Position(33397, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3 }, + [4] = { fromPosition = Position(33396, 31474, 14), toPosition = Position(33398, 31476, 14), crystalPosition = Position(33397, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4 }, + [5] = { fromPosition = Position(33393, 31477, 14), toPosition = Position(33395, 31479, 14), crystalPosition = Position(33394, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5 }, + [6] = { fromPosition = Position(33389, 31477, 14), toPosition = Position(33391, 31479, 14), crystalPosition = Position(33390, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6 }, + [7] = { fromPosition = Position(33386, 31474, 14), toPosition = Position(33388, 31476, 14), crystalPosition = Position(33387, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7 }, + [8] = { fromPosition = Position(33386, 31470, 14), toPosition = Position(33388, 31472, 14), crystalPosition = Position(33387, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8 }, } local config = AscendingFerumbrasConfig @@ -23,15 +23,15 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil for i = 1, #crystals do local crystal = crystals[i] if creature:getPosition():isInRange(crystal.fromPosition, crystal.toPosition) then - if Game.getStorageValue(crystal.globalStorage) > 8 then + if player:getStorageValue(crystal.globalStorage) > 8 then local item = Tile(crystal.crystalPosition):getItemById(14955) if not item then return true end item:transform(14961) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals) + 1) end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals) == 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals) == 8 then local creature = Tile(config.bossPos):getTopCreature() creature:say("NOOOOOOOOOOO!", TALKTYPE_MONSTER_YELL) creature:say("FERUMBRAS BURSTS INTO SOUL SPLINTERS!", TALKTYPE_MONSTER_YELL, nil, nil, Position(33392, 31475, 14)) @@ -42,7 +42,7 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil Game.createMonster("Ferumbras Soul Splinter", Position(33392, 31473, 14), false, true) end end - Game.setStorageValue(crystal.globalStorage, Game.getStorageValue(crystal.globalStorage) + 1) + player:setStorageValue(crystal.globalStorage, player:getStorageValue(crystal.globalStorage) + 1) lasthitkiller:say("The negative energy of the rift creature is absorbed by the crystal!", TALKTYPE_MONSTER_SAY, nil, nil, crystal.crystalPosition) lasthitkiller:say("ARGH!", TALKTYPE_MONSTER_SAY, nil, nil, Position(33392, 31473, 14)) end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_the_shatterer_kill.lua similarity index 93% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_the_shatterer_kill.lua index 493db2c089e..85f1494cd2e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_the_shatterer_kill.lua @@ -85,7 +85,7 @@ local newPos = Position(33436, 32443, 15) local theShattererKill = CreatureEvent("TheShattererDeath") function theShattererKill.onDeath(creature) onDeathForDamagingPlayers(creature, function(creature, player) - player:setStorageValue(Storage.FerumbrasAscension.TheShatterer, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShatterer, 1) end) local teleport = Tile(Position(33393, 32438, 14)):getItemById(1949) @@ -100,8 +100,8 @@ function theShattererKill.onDeath(creature) addEvent(revertTeleport, 2 * 60 * 1000, teleportPos, 22761, 1949, oldPos) revert() end - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, 0) - Game.setStorageValue(Storage.FerumbrasAscension.TheShattererTimer, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererTimer, 0) return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_zamulosh_clone.lua similarity index 84% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_zamulosh_clone.lua index 6b6a2b4494c..6a24fea1c9f 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_zamulosh_clone.lua @@ -8,7 +8,7 @@ end local zamuloshClone = CreatureEvent("ZamuloshClone") function zamuloshClone.onThink(creature) - local spectators = Game.getSpectators(Position(33644, 32757, 11), false, false, 10, 10, 10, 10) + local spectators = player:getSpectators(Position(33644, 32757, 11), false, false, 10, 10, 10, 10) for i = 1, #spectators do local master = spectators[i] if master:getMaxHealth() == 300000 and not master:getMaster() then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_1.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_1.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_1.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_1.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_2.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_2.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_2.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_2.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_blue_gem.lua similarity index 73% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_blue_gem.lua index 60083434a04..da8a8e442d2 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_blue_gem.lua @@ -33,19 +33,19 @@ local function revertBasin(position) end function revertStorages() - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 0) end local blueGem = MoveEvent() function blueGem.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) >= 1 then + if not player or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) >= 1 then position:sendMagicEffect(CONST_ME_TELEPORT) return true end @@ -54,10 +54,10 @@ function blueGem.onStepIn(creature, item, position, fromPosition) local leverSecond = Tile(Position(33613, 32691, 13)):getItemById(9110) or Tile(Position(33613, 32691, 13)):getItemById(9111) -- lever green local leverThird = Tile(Position(33651, 32661, 13)):getItemById(9110) or Tile(Position(33651, 32661, 13)):getItemById(9111) -- lever red local leverFour = Tile(Position(33672, 32688, 13)):getItemById(9110) or Tile(Position(33672, 32688, 13)):getItemById(9111) -- lever green - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 3) -- blue - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 2) -- green - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 1) -- red - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 5) -- grass + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 3) -- blue + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 2) -- green + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 1) -- red + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 5) -- grass player:sendTextMessage( MESSAGE_EVENT_ADVANCE, "You hear a whisper: \z @@ -71,7 +71,7 @@ function blueGem.onStepIn(creature, item, position, fromPosition) leverThird:setActionId(53823) leverFour:setActionId(53824) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 1) item:transform(8648) addEvent(activeBasin, 1 * 1000, position) addEvent(revertBasin, 60 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua new file mode 100644 index 00000000000..41bf3809f13 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua @@ -0,0 +1,79 @@ +local config = { + [24830] = { + storage = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn, + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RazzagornTime, + bossName = "Razzagorn", + }, + [24831] = { + storage = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz, + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RagiazTime, + bossName = "Ragiaz", + }, + [24832] = { + storage = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh, + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTime, + bossName = "Zamulosh", + }, + [24833] = { + storage = Storage.Quest.U10_90.FerumbrasAscension.Mazoran, + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.MazoranTime, + bossName = "Mazoran", + }, + [24834] = { + storage = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz, + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.TarbazTime, + bossName = "Tarbaz", + }, + [24835] = { + storage = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax, + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ShulgraxTime, + bossName = "Shulgrax", + }, + [24836] = { + storage = Storage.Quest.U10_90.FerumbrasAscension.Plagirath, + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.PlagirathTime, + bossName = "Plagirath", + }, +} + +local bossTeleport = MoveEvent() + +function bossTeleport.onStepIn(creature, item, position, fromPosition) + local teleportConfig = config[item.actionid] + if not teleportConfig then + return false + end + local player = creature:getPlayer() + if not player then + return true + end + + local cooldownStorage = teleportConfig.cooldownStorage + local bossName = teleportConfig.bossName + local cooldownTime = player:getStorageValue(cooldownStorage) + + if cooldownTime > os.time() then + local remainingTime = cooldownTime - os.time() + local hours = math.floor(remainingTime / 3600) + local minutes = math.floor((remainingTime % 3600) / 60) + player:teleportTo(fromPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true + end + + if player:getStorageValue(teleportConfig.storage) ~= 1 then + player:teleportTo(fromPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true + end + + return true +end + +bossTeleport:type("stepin") + +for index, value in pairs(config) do + bossTeleport:aid(index) +end + +bossTeleport:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua new file mode 100644 index 00000000000..4d2fc197bc4 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua @@ -0,0 +1,24 @@ +local desperateSoul = MoveEvent() + +function desperateSoul.onStepIn(creature, item, position, fromPosition) + if not creature:isMonster() or creature:getName():lower() ~= "desperate soul" then + return true + end + + creature:remove() + position:sendMagicEffect(CONST_ME_POFF) + + local player = Tile(fromPosition):getTopCreature() + if player and player:isPlayer() then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, 1) + addEvent(function() + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, 0) + end, 2 * 60 * 1000) + end + + return true +end + +desperateSoul:type("stepin") +desperateSoul:aid(54390) +desperateSoul:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_entrance.lua similarity index 57% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_entrance.lua index 356434282bb..b6e2aa6e4a5 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_entrance.lua @@ -1,11 +1,11 @@ local config = { - [1] = { storage = Storage.FerumbrasAscension.Razzagorn }, - [2] = { storage = Storage.FerumbrasAscension.Ragiaz }, - [3] = { storage = Storage.FerumbrasAscension.Zamulosh }, - [4] = { storage = Storage.FerumbrasAscension.Mazoran }, - [5] = { storage = Storage.FerumbrasAscension.Tarbaz }, - [6] = { storage = Storage.FerumbrasAscension.Shulgrax }, - [7] = { storage = Storage.FerumbrasAscension.Plagirath }, + [1] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn }, + [2] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz }, + [3] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh }, + [4] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Mazoran }, + [5] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz }, + [6] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax }, + [7] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Plagirath }, } local entrance = MoveEvent() @@ -15,15 +15,23 @@ function entrance.onStepIn(creature, item, position, fromPosition) if not player then return true end - local complete = false + + if player:getLevel() < 150 then + player:teleportTo(fromPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to be at least level 150 to enter.") + return true + end + + local complete = true for i = 1, #config do local storage = config[i].storage if player:getStorageValue(storage) ~= 1 then complete = false - else - complete = true + break end end + if item:getActionId() == 24837 then if complete then player:teleportTo(Position(33275, 32390, 9)) @@ -35,7 +43,7 @@ function entrance.onStepIn(creature, item, position, fromPosition) return true end elseif item:getActionId() == 24838 then - if player:getStorageValue(Storage.FerumbrasAscension.Access) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Access) < 1 then player:teleportTo(Position(33275, 32390, 8)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This portal is not yet strong enough to breach the destination dimension.") diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_flower_puzzle.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_flower_puzzle.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_flower_puzzle.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_flower_puzzle.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_gate_of_deathstruction.lua similarity index 90% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_gate_of_deathstruction.lua index 0b74b80d86e..09369882785 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_gate_of_deathstruction.lua @@ -6,7 +6,7 @@ function gateOfDeathstruction.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.FerumbrasAscension.Statue) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Statue) < 1 then position:sendMagicEffect(CONST_ME_TELEPORT) position.y = position.y + 2 player:teleportTo(position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_green_gem.lua similarity index 73% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_green_gem.lua index 885d2a2e0ff..aaa8ffd9e6f 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_green_gem.lua @@ -34,19 +34,19 @@ local function revertBasin(position) end function revertStorages() - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 0) end local greenGem = MoveEvent() function greenGem.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) >= 1 then + if not player or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) >= 1 then position:sendMagicEffect(CONST_ME_TELEPORT) return true end @@ -55,10 +55,10 @@ function greenGem.onStepIn(creature, item, position, fromPosition) local leverSecond = Tile(Position(33671, 32638, 13)):getItemById(9110) or Tile(Position(33671, 32638, 13)):getItemById(9111) -- lever blue local leverThird = Tile(Position(33651, 32661, 13)):getItemById(9110) or Tile(Position(33651, 32661, 13)):getItemById(9111) -- lever red local leverFour = Tile(Position(33673, 32688, 13)):getItemById(9110) or Tile(Position(33673, 32688, 13)):getItemById(9111) -- lever green - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 2) -- green - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 3) -- blue - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 1) -- red - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 6) -- ice + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 2) -- green + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 3) -- blue + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 1) -- red + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 6) -- ice player:sendTextMessage( MESSAGE_EVENT_ADVANCE, "You hear a whisper: \z @@ -72,7 +72,7 @@ function greenGem.onStepIn(creature, item, position, fromPosition) leverThird:setActionId(53823) leverFour:setActionId(53824) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 1) item:transform(8648) addEvent(activeBasin, 1 * 1000, position) addEvent(revertBasin, 60 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_habitats_access.lua similarity index 88% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_habitats_access.lua index 748ba3d574f..984782bac2f 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_habitats_access.lua @@ -2,7 +2,7 @@ local config = { [34323] = { toPosition = Position(33630, 32651, 12), backPosition = Position(33630, 32651, 12), - timer = Storage.FerumbrasAscension.HabitatsTimer, + timer = Storage.Quest.U10_90.FerumbrasAscension.HabitatsTimer, }, } @@ -20,7 +20,7 @@ function habitatsAccess.onStepIn(creature, item, position, fromPosition) end if item.actionid == 34323 then - if player:getStorageValue(Storage.FerumbrasAscension.HabitatsAccess) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess) >= 1 then if player:getStorageValue(setting.timer) < os.time() then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_lovely_monsters.lua similarity index 69% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_lovely_monsters.lua index f9808413ca6..1a008755b63 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_lovely_monsters.lua @@ -12,8 +12,8 @@ local config = { local lovelyMonsters = MoveEvent() function lovelyMonsters.onStepIn(creature, item, position, fromPosition) - local config = config[item.actionid] - if not config then + local monsterConfig = config[item.actionid] + if not monsterConfig then return true end @@ -22,18 +22,19 @@ function lovelyMonsters.onStepIn(creature, item, position, fromPosition) end local monster = creature:getMonster() - if monster:getName():lower() == config.name then + if monster:getName():lower() == monsterConfig.name then monster:say("That seemed correct!", TALKTYPE_MONSTER_SAY) monster:getPosition():sendMagicEffect(CONST_ME_THUNDER) monster:remove() - local spectators = Game.getSpectators(config.centerPos, false, true, 9, 9, 9, 9) + + local spectators = Game.getSpectators(monsterConfig.centerPos, false, true, 9, 9, 9, 9) for _, spectator in pairs(spectators) do if spectator:isPlayer() then local player = spectator - if player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) < 0 then - player:setStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports, 0) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) < 0 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports, 0) end - player:setStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports, player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) + 1) end end return true diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_mazoran_fire.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_mazoran_fire.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_mazoran_fire.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_mazoran_fire.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_plagirath_access.lua similarity index 86% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_plagirath_access.lua index b949b797b90..554e351e533 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_plagirath_access.lua @@ -6,7 +6,7 @@ function plagirathAccess.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.FerumbrasAscension.TheLordOfTheLiceAccess) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceAccess) < 1 then local pos = player:getPosition() pos.x = pos.x - 2 player:teleportTo(pos) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_razzagorn_access.lua similarity index 87% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_razzagorn_access.lua index c83b7be6f48..fe196bbf6e5 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_razzagorn_access.lua @@ -6,7 +6,7 @@ function razzagornAccess.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.FerumbrasAscension.TheShatterer) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShatterer) >= 1 then player:teleportTo(Position(33437, 32443, 15)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_red_gem.lua similarity index 67% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_red_gem.lua index a4acd970006..a98438661e5 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_red_gem.lua @@ -34,19 +34,19 @@ local function revertBasin(position) end function revertStorages() - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 0) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 0) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 0) end local redGem = MoveEvent() function redGem.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) >= 1 then + if not player or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) >= 1 then position:sendMagicEffect(CONST_ME_TELEPORT) return true end @@ -55,10 +55,10 @@ function redGem.onStepIn(creature, item, position, fromPosition) local leverSecond = Tile(Position(33671, 32638, 13)):getItemById(9110) or Tile(Position(33671, 32638, 13)):getItemById(9111) -- lever blue local leverThird = Tile(Position(33613, 32691, 13)):getItemById(9110) or Tile(Position(33613, 32691, 13)):getItemById(9111) -- lever green local leverFour = Tile(Position(33671, 32688, 13)):getItemById(9110) or Tile(Position(33671, 32688, 13)):getItemById(9111) -- lever green - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 1) -- red - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 3) -- blue - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 2) -- green - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 4) -- blood + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 1) -- red + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 3) -- blue + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 2) -- green + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 4) -- blood player:sendTextMessage( MESSAGE_EVENT_ADVANCE, "You hear a whisper: \z @@ -67,12 +67,12 @@ function redGem.onStepIn(creature, item, position, fromPosition) if not leverFirst or not leverSecond or not leverThird or not leverFour then return false end - leverFirst:setActionId(53820 + Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First)) - leverSecond:setActionId(53820 + Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second)) - leverThird:setActionId(53820 + Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third)) + leverFirst:setActionId(53820 + player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First)) + leverSecond:setActionId(53820 + player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second)) + leverThird:setActionId(53820 + player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third)) leverFour:setActionId(53824) end - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 1) item:transform(8648) addEvent(activeBasin, 1 * 1000, position) addEvent(revertBasin, 60 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_seal.lua similarity index 63% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_seal.lua index f8727da061e..67b7b8986f2 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_seal.lua @@ -3,41 +3,49 @@ local config = { toPosition = Position(33419, 32841, 11), backPosition = Position(33484, 32775, 12), boss = "Tarbaz", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.TarbazTime, }, [24840] = { toPosition = Position(33452, 32356, 13), backPosition = Position(33432, 32330, 14), boss = "Ragiaz", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RagiazTime, }, [24841] = { toPosition = Position(33230, 31493, 13), backPosition = Position(33197, 31438, 13), boss = "Plagirath", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.PlagirathTime, }, [24842] = { toPosition = Position(33380, 32454, 14), backPosition = Position(33399, 32402, 15), boss = "Razzagorn", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RazzagornTime, }, [24843] = { toPosition = Position(33680, 32736, 11), backPosition = Position(33664, 32682, 10), boss = "Zamulosh", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTime, }, [24844] = { toPosition = Position(33593, 32658, 14), backPosition = Position(33675, 32690, 13), boss = "Mazoran", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.MazoranTime, }, [24845] = { toPosition = Position(33436, 32800, 13), backPosition = Position(33477, 32701, 14), boss = "Shulgrax", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ShulgraxTime, }, [24846] = { toPosition = Position(33270, 31474, 14), backPosition = Position(33324, 31374, 14), boss = "Ferumbras Mortal Shell", + cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.FerumbrasMortalShellTime, }, } @@ -54,8 +62,20 @@ function seal.onStepIn(creature, item, position, fromPosition) return true end - if item.actionid == 24844 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 4 then + local cooldownTime = player:getStorageValue(setting.cooldownStorage) + if cooldownTime > os.time() then + local remainingTime = cooldownTime - os.time() + local days = math.floor(remainingTime / (24 * 3600)) + local hours = math.floor((remainingTime % (24 * 3600)) / 3600) + local minutes = math.floor((remainingTime % 3600) / 60) + player:teleportTo(setting.backPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait for time to pass for this boss again.") + return true + end + + if item.actionid == 24844 then -- Mazoran + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 4 then if player:canFightBoss(setting.boss) then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -73,9 +93,8 @@ function seal.onStepIn(creature, item, position, fromPosition) item:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end - end - if item.actionid == 24845 then - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then + elseif item.actionid == 24845 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer) >= 1 then if player:canFightBoss(setting.boss) then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -93,18 +112,12 @@ function seal.onStepIn(creature, item, position, fromPosition) item:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end + elseif item.actionid == 24846 then -- Ferumbras Mortal Shell + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The portal leads you to the final challenge.") end - if player:canFightBoss(setting.boss) then - player:teleportTo(setting.toPosition) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - elseif item.actionid == 24846 then - local days = AscendingFerumbrasConfig.days - player:say("You cannot enter, you must wait " .. days .. " days after preventing the ascension of Ferumbras.", TALKTYPE_MONSTER_SAY) - else - player:teleportTo(setting.backPosition) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:say("You have to wait to challenge this enemy again!", TALKTYPE_MONSTER_SAY) - end + + player:teleportTo(setting.toPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_shulgrax_lever.lua similarity index 86% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_shulgrax_lever.lua index f0a74a7a058..d6052ee0861 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_shulgrax_lever.lua @@ -6,7 +6,7 @@ function shulgraxLever.onStepIn(creature, item, position, fromPosition) return true end - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer) >= 1 then player:teleportTo(Position(33436, 32800, 13)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_stair.lua similarity index 60% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_stair.lua index 3ab9d7b1a30..f7f9366ecd8 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_stair.lua @@ -1,11 +1,11 @@ local config = { - [1] = { storage = Storage.FerumbrasAscension.Razzagorn }, - [2] = { storage = Storage.FerumbrasAscension.Ragiaz }, - [3] = { storage = Storage.FerumbrasAscension.Zamulosh }, - [4] = { storage = Storage.FerumbrasAscension.Mazoran }, - [5] = { storage = Storage.FerumbrasAscension.Tarbaz }, - [6] = { storage = Storage.FerumbrasAscension.Shulgrax }, - [7] = { storage = Storage.FerumbrasAscension.Plagirath }, + [1] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn }, + [2] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz }, + [3] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh }, + [4] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Mazoran }, + [5] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz }, + [6] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax }, + [7] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Plagirath }, } local stair = MoveEvent() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_vortex.lua similarity index 71% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_vortex.lua index eaa838cd8e1..6a001370f7c 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_vortex.lua @@ -10,8 +10,8 @@ function vortex.onStepIn(creature, item, position, fromPosition) monster:remove() position:sendMagicEffect(CONST_ME_POFF) - Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence) + 1) - if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence) >= 8 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence) + 1) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence) >= 8 then Game.createMonster("Destabilized Ferumbras", config.bossPos, true, true) for i = 1, config.maxSummon do Game.createMonster("Rift Fragment", Position(math.random(33381, 33403), math.random(31462, 31483), 14), true, true) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_zamulosh_teleport.lua similarity index 79% rename from data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascension/movements_zamulosh_teleport.lua index 11f98b10861..fcb6ecf332b 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_zamulosh_teleport.lua @@ -7,7 +7,7 @@ function zamuloshTeleport.onStepIn(creature, item, position, fromPosition) end if item.actionid == 34313 then - if player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) >= 9 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) >= 9 then player:teleportTo(Position(33618, 32620, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "What was wrong is not necessarily right now. Nevertheless you nade it further.") @@ -21,11 +21,11 @@ function zamuloshTeleport.onStepIn(creature, item, position, fromPosition) return true end elseif item.actionid == 34314 then - if player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) >= 4 and Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) >= 4 and player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then player:teleportTo(Position(33618, 32620, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "What was wrong is not necessarily right now. Nevertheless you nade it further.") - player:setStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports, 9) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports, 9) return true else local pos = player:getPosition() diff --git a/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua b/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua index 1673696aaea..5fd560ef6db 100644 --- a/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua +++ b/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua @@ -6,7 +6,7 @@ function hoist.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.QuestChests.FormorgarMinesHoistSkeleton) ~= 1 or player:getStorageValue(Storage.QuestChests.FormorgarMinesHoistChest) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.FormorgarMinesHoistSkeleton) ~= 1 or player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.FormorgarMinesHoistChest) ~= 1 then player:teleportTo(fromPosition) player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must first find the hoist instruction before using it.") diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua deleted file mode 100644 index 987ccb4838a..00000000000 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua +++ /dev/null @@ -1,17 +0,0 @@ -local gravediggerFlask = Action() -function gravediggerFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid ~= 3998 then - return false - end - - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission11) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission12) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission12, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Done! Report back to Omrabas.") - player:addItem(19086, 1) - item:remove() - end - return true -end - -gravediggerFlask:id(19085) -gravediggerFlask:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua deleted file mode 100644 index 2f1960bfdb4..00000000000 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua +++ /dev/null @@ -1,20 +0,0 @@ -local gravediggerInscriptions = Action() -function gravediggerInscriptions.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission45) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission46) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission46, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to breathe, stangely. One word stays in your mind: bronze") - player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission46) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission47) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission47, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to glow slightly. A name fixes in your mind: Takesha Antishu") - player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission47) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission48, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to flutter. One word stays in your mind: floating") - player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) - end - return true -end - -gravediggerInscriptions:aid(4651, 4652, 4653) -gravediggerInscriptions:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua deleted file mode 100644 index cfd0f644704..00000000000 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua +++ /dev/null @@ -1,24 +0,0 @@ -local config = { - [4641] = { storageKey = { Storage.GravediggerOfDrefia.Mission32, Storage.GravediggerOfDrefia.Mission32a }, message = "Shadows rise and engulf the candle. The statue flickers in an unearthly light." }, - [4642] = { storageKey = { Storage.GravediggerOfDrefia.Mission32a, Storage.GravediggerOfDrefia.Mission32b }, message = "The shadows of the statue swallow the candle hungrily." }, - [4643] = { storageKey = { Storage.GravediggerOfDrefia.Mission32b, Storage.GravediggerOfDrefia.Mission33 }, message = "A shade emerges and snatches the candle from your hands." }, -} - -local gravediggerMonks = Action() -function gravediggerMonks.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local targetItem = config[target.actionid] - if not targetItem then - return true - end - - local cStorages = targetItem.storageKey - if player:getStorageValue(cStorages[1]) == 1 and player:getStorageValue(cStorages[2]) < 1 then - player:setStorageValue(cStorages[2], 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, targetItem.message) - item:remove(1) - end - return true -end - -gravediggerMonks:id(18931) -gravediggerMonks:register() diff --git a/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua b/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua index 426a043f54d..df23caae4bb 100644 --- a/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua +++ b/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua @@ -11,7 +11,7 @@ function entranceAncientFeud.onUse(creature, item, position, fromPosition) if not player then return false end - if player:getStorageValue(Storage.Quest.U10_80.Grimvale.AncientFeudShortcut) < 0 then + if player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.AncientFeudShortcut) < 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are not worthy to travel by the lion's roar.") player:teleportTo(fromPosition, true) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua b/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua index dc2870c1d72..fcadada9939 100644 --- a/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua +++ b/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua @@ -12,7 +12,7 @@ local rewards = { local tests = { { - storage = Storage.LionsRock.OuterSanctum.LionsStrength, + storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength, itemPosition = { x = 33137, y = 32291, z = 8 }, pagodaPosition = { x = 33134, y = 32289, z = 8 }, item = 9634, @@ -20,7 +20,7 @@ local tests = { effect = CONST_ME_BLOCKHIT, }, { - storage = Storage.LionsRock.OuterSanctum.LionsBeauty, + storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty, itemPosition = { x = 33138, y = 32369, z = 8 }, pagodaPosition = { x = 33136, y = 32369, z = 8 }, item = 21389, @@ -28,7 +28,7 @@ local tests = { effect = CONST_ME_REDSMOKE, }, { - storage = Storage.LionsRock.OuterSanctum.LionsTears, + storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears, itemPosition = { x = 33154, y = 32279, z = 8 }, pagodaPosition = { x = 33156, y = 32279, z = 8 }, item = 21466, @@ -58,11 +58,11 @@ function lionsRockSacrificesTest.onUse(player, item, fromPosition, target, toPos pagoda:transform(2075) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message) player:setStorageValue(setting.storage, 1) - if player:getStorageValue(Storage.LionsRock.Questline) < 1 then - player:setStorageValue(Storage.LionsRock.Questline, math.max(player:getStorageValue(Storage.LionsRock.Questline), 1)) - player:setStorageValue(Storage.LionsRock.Questline, player:getStorageValue(Storage.LionsRock.Questline) + 1) + if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) < 1 then + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) + 1) else - player:setStorageValue(Storage.LionsRock.Questline, player:getStorageValue(Storage.LionsRock.Questline) + 1) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) + 1) end player:removeItem(setting.item, 1) toPosition:sendMagicEffect(setting.effect) @@ -83,8 +83,8 @@ local lionsGetLionsMane = Action() function lionsGetLionsMane.onUse(player, item, fromPosition, target, toPosition, isHotkey) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You picked a beautiful lion's mane flower.") player:addItem(21389, 1) - player:setStorageValue(Storage.LionsRock.Questline, math.max(player:getStorageValue(Storage.LionsRock.Questline), 1)) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) item:transform(21935) addEvent(function() item:transform(21388) @@ -101,8 +101,8 @@ local lionsGetHolyWater = Action() function lionsGetHolyWater.onUse(player, item, fromPosition, target, toPosition, isHotkey) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took some holy water from the sacred well.") player:addItem(21466, 1) - player:setStorageValue(Storage.LionsRock.Questline, math.max(player:getStorageValue(Storage.LionsRock.Questline), 1)) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) return true end @@ -116,7 +116,7 @@ function lionsRockFountain.onUse(player, item, fromPosition, target, toPosition, if item:getId() ~= 6389 then return false end - if player:getStorageValue(Storage.LionsRock.Time) < os.time() then + if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Time) < os.time() then local reward = "" if player:hasMount(40) then repeat @@ -131,8 +131,8 @@ function lionsRockFountain.onUse(player, item, fromPosition, target, toPosition, player:addAchievement("Lion's Den Explorer") item:transform(lionsRockSanctuaryRockId) player:addItem(rewards[reward], 1) - player:setStorageValue(Storage.LionsRock.Time, os.time() + 24 * 60 * 60) - player:setStorageValue(Storage.LionsRock.Questline, 11) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Time, os.time() + 24 * 60 * 60) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, 11) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "At the moment there is neither a treasure nor anything else in the fountain. Perhaps you might return later.") end diff --git a/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua b/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua index 8e91e90579f..b3c0238d32d 100644 --- a/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua +++ b/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua @@ -1,25 +1,25 @@ local signs = { { pos = { x = 33095, y = 32244, z = 9 }, - storage = Storage.LionsRock.InnerSanctum.SnakeSign, + storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign, message1 = "With the aid of the old scroll you translate the inscriptions on the floor: And the mighty lion defeated the jealous snake.", message2 = "As a sign of victory he tooks its eye, yellow as envy and malevolence, and out of a foul creature created a precious treasure.", }, { pos = { x = 33128, y = 32300, z = 9 }, - storage = Storage.LionsRock.InnerSanctum.LizardSign, + storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign, message1 = "With the aid of the old scroll you translate the inscriptions on the floor: And the mighty lion defeated the lazy lizard.", message2 = "As a sign of victory he tooks its egg, blue as sloth and conceit, and out of a foul creature created a precious treasure.", }, { pos = { x = 33109, y = 32329, z = 9 }, - storage = Storage.LionsRock.InnerSanctum.ScorpionSign, + storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign, message1 = "With the aid of the old scroll you translate the inscriptions on the golden altar: And the mighty lion defeated the treacherous scorpion.", message2 = "As a sign of victory he tooks its poison, violet as deceit and betrayal, and created a precious treasure.", }, { pos = { x = 33127, y = 32340, z = 9 }, - storage = Storage.LionsRock.InnerSanctum.HyenaSign, + storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign, message1 = "With the aid of the old scroll you translate the inscriptions on the golden statue: And the mighty lion defeated the greedy hyaena.", message2 = "As a sign of victory he tooks its blood, red as voracity and lust, and created a precious treasure.", }, @@ -34,7 +34,7 @@ function lionsRockEntrance.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.LionsRock.Questline) >= 4 then + if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) >= 4 then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo({ x = 33122, y = 32308, z = 8 }) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have passed the Lion's Tests and are now worthy to enter the inner sanctum!") @@ -79,12 +79,12 @@ function lionsRockTranslationScroll.onStepIn(creature, item, position, fromPosit end end - if player:getStorageValue(Storage.LionsRock.Questline) == 4 then + if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) == 4 then local amphora = Tile(amphoraPos):getItemById(amphoraID) if amphora then amphora:transform(amphoraBrokenID) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "As you pass incautiously, the ancient amphora crumbles to shards and dust. Amidst the debris you discover an old scroll.") - player:setStorageValue(Storage.LionsRock.Questline, 5) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, 5) player:addItem(21467, 1) amphoraPos:sendMagicEffect(CONST_ME_GROUNDSHAKER) addEvent(reset, 15 * 1000) @@ -113,7 +113,7 @@ function lionsRockSigns.onStepIn(creature, item, position, fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message2) player:setStorageValue(setting.storage, 1) - player:setStorageValue(Storage.LionsRock.Questline, player:getStorageValue(Storage.LionsRock.Questline) + 1) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) + 1) end end return true @@ -133,9 +133,9 @@ function lionsRockMessage.onStepIn(creature, item, position, fromPosition) if not player then return end - if player:getStorageValue(Storage.LionsRock.InnerSanctum.Message) < 1 then + if player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.Message) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You enter a temple area which is gorgeously decorated and mysteriously unaffected by the course of time.") - player:setStorageValue(Storage.LionsRock.InnerSanctum.Message, 1) + player:setStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.Message, 1) end return true end diff --git a/data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua b/data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua new file mode 100644 index 00000000000..04966ae8c7b --- /dev/null +++ b/data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua @@ -0,0 +1,106 @@ +if not MONO_DETECTOR_MAP then + MONO_DETECTOR_MAP = {} +end + +local primary_area = { + from = Position(33612, 31867, 10), + to = Position(33679, 31983, 10), +} + +local secondary_area = { + from = Position(33607, 31905, 11), + to = Position(33664, 31953, 11), +} + +local function isPositionInArea(pos, area) + return pos.x >= area.from.x and pos.x <= area.to.x and pos.y >= area.from.y and pos.y <= area.to.y and pos.z >= area.from.z and pos.z <= area.to.z +end + +local function getRandomPositionInPrimaryArea() + local randomPos + repeat + randomPos = Position(math.random(primary_area.from.x, primary_area.to.x), math.random(primary_area.from.y, primary_area.to.y), primary_area.from.z) + until isPositionInArea(randomPos, primary_area) + return randomPos +end + +local function getRandomPositionInSecondaryArea() + local randomPos + repeat + randomPos = Position(math.random(secondary_area.from.x, secondary_area.to.x), math.random(secondary_area.from.y, secondary_area.to.y), secondary_area.from.z) + until isPositionInArea(randomPos, secondary_area) + return randomPos +end + +local actions_mono_detector = Action() + +function actions_mono_detector.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local stat = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) + + if stat == 0 or stat >= 2 then + return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + end + + local current = MONO_DETECTOR_MAP[player:getGuid()] + if not current then + local random + if isPositionInArea(player:getPosition(), primary_area) then + random = getRandomPositionInPrimaryArea() + else + random = getRandomPositionInSecondaryArea() + end + MONO_DETECTOR_MAP[player:getGuid()] = random + current = random + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The probe has been adjusted.") + return true + end + + local playerPos = player:getPosition() + local dx = math.abs(playerPos.x - current.x) + local dy = math.abs(playerPos.y - current.y) + local dz = math.abs(playerPos.z - current.z) + + if dx <= 15 and dy <= 15 and dz == 0 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The device reads: 'abnormal glooth structure detected, possible probing location'") + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Hm... the device reads: 0,0,zero,0,zero which may roughly translate to: NOTHING OF INTEREST HERE") + end + + return true +end + +actions_mono_detector:id(21192) +actions_mono_detector:register() + +local actions_strange_probing_device = Action() + +function actions_strange_probing_device.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local stat = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) + local current = MONO_DETECTOR_MAP[player:getGuid()] + + if stat == 0 or stat >= 2 then + return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + end + + if fromPosition.x ~= item:getPosition().x or fromPosition.y ~= item:getPosition().y or fromPosition.z ~= item:getPosition().z then + return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + end + + if current and item:getPosition() then + local itemPos = item:getPosition() + local dx = math.abs(itemPos.x - current.x) + local dy = math.abs(itemPos.y - current.y) + local dz = math.abs(itemPos.z - current.z) + + if dx <= 15 and dy <= 15 and dz == 0 then + item:remove() + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, 2) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully gathered the data.") + end + end + + return true +end + +actions_strange_probing_device:id(21208) +actions_strange_probing_device:register() diff --git a/data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua b/data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua new file mode 100644 index 00000000000..18bcd791fea --- /dev/null +++ b/data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua @@ -0,0 +1,46 @@ +local config = { + [21039] = { itemGerator = 21792, itemTransform = 21039 }, + [21040] = { itemGerator = 21792, itemTransform = 21040 }, +} + +local function revertItem(toPosition, getItemId, itemTransform) + local tile = toPosition:getTile() + if tile then + local thing = tile:getItemById(getItemId) + if thing then + thing:transform(itemTransform) + end + end +end + +local theAncientSewers = Action() + +function theAncientSewers.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local gerator = config[item.itemid] + if not gerator then + return true + end + + player:say((math.random(1, 100) < 50) and " There This piece fixed." or " This should do it.", TALKTYPE_MONSTER_SAY) + item:transform(gerator.itemGerator) + addEvent(revertItem, 2 * 60 * 1000, toPosition, gerator.itemGerator, gerator.itemTransform) + toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) + + local currentMission = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) + if currentMission >= 1 and currentMission < 20 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, currentMission + 1) + elseif currentMission == 20 then + if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission03) < 1 then + player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission03, 1) + end + + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 21) + end + return true +end + +for itemId, info in pairs(config) do + theAncientSewers:id(itemId) +end + +theAncientSewers:register() diff --git a/data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua b/data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua deleted file mode 100644 index 1419a97a709..00000000000 --- a/data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua +++ /dev/null @@ -1,84 +0,0 @@ -local function revertItem(toPosition, getItemId, itemTransform) - local tile = toPosition:getTile() - if tile then - local thing = tile:getItemById(getItemId) - if thing then - thing:transform(itemTransform) - end - end -end - -local config = { - [21039] = { itemGerator = 21792, itemTransform = 21039 }, -- Gerator 1 - [21040] = { itemGerator = 21792, itemTransform = 21040 }, -- Gerator 2 -} - -local theAncientSewers = Action() - -function theAncientSewers.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local gerator = config[item.itemid] - if gerator then - local chance = math.random(1, 100) - if (chance >= 1) and (chance < 50) then - player:say(" There This piece fixed.", TALKTYPE_MONSTER_SAY) - elseif (chance >= 50) and (chance < 100) then - player:say(" This should do it.", TALKTYPE_MONSTER_SAY) - end - - item:transform(gerator.itemGerator) - addEvent(revertItem, 2 * 60 * 1000, toPosition, gerator.itemGerator, gerator.itemTransform) - toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) - if player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) <= 0 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 1) - player:setStorageValue(Storage.Oramond.MissionToTakeRoots1) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 1 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 2) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 2 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 3) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 3 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 4) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 4 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 5) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 5 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 6) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 6 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 7) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 7 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 8) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 8 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 9) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 9 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 10) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 10 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 11) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 11 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 12) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 12 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 13) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 13 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 14) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 14 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 15) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 15 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 16) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 16 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 17) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 17 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 18) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 18 then - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 19) - elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 19 then - if player:getStorageValue(Storage.DarkTrails.Mission03) < 1 then - player:setStorageValue(Storage.DarkTrails.Mission03, 1) - end - player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 20) - end - end - return true -end - -for itemId, info in pairs(config) do - theAncientSewers:id(itemId) -end - -theAncientSewers:register() diff --git a/data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua b/data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua new file mode 100644 index 00000000000..8f80a6ab9a7 --- /dev/null +++ b/data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua @@ -0,0 +1,41 @@ +local function revertItem(toPosition, getItemId, itemTransform) + local tile = toPosition:getTile() + if tile then + local thing = tile:getItemById(getItemId) + if thing then + thing:transform(itemTransform) + end + end +end + +local config = { + [21088] = { transformedItemId = 21090, rewardItemId = 21089, revertTime = 10 * 60 * 1000 }, +} + +local itemTransformation = Action() + +function itemTransformation.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local transformation = config[item.itemid] + if transformation then + item:transform(transformation.transformedItemId) + + player:addItem(transformation.rewardItemId, 1) + + local messages = { + "Achoo! You spill the pollen into your bag.", + "You collected the smelly pollen into a bag.", + } + player:say(messages[math.random(#messages)], TALKTYPE_MONSTER_SAY, false, player, toPosition) + + addEvent(revertItem, transformation.revertTime, toPosition, transformation.transformedItemId, item.itemid) + + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + end + return true +end + +for itemId, info in pairs(config) do + itemTransformation:id(itemId) +end + +itemTransformation:register() diff --git a/data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua b/data-otservbr-global/scripts/quests/oramond/to_take_roots/actions_to_take_roots.lua similarity index 60% rename from data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua rename to data-otservbr-global/scripts/quests/oramond/to_take_roots/actions_to_take_roots.lua index bf827c7e4f3..71c4f55d8b4 100644 --- a/data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua +++ b/data-otservbr-global/scripts/quests/oramond/to_take_roots/actions_to_take_roots.lua @@ -15,13 +15,13 @@ function toTakeRoots.onUse(player, item, fromPosition, target, toPosition, isHot item:transform(item.itemid + 2) addEvent(revertRoot, 120000, toPosition, 21106, 21104) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) - if player:getStorageValue(Storage.Oramond.QuestLine) <= 0 then - player:setStorageValue(Storage.Oramond.QuestLine, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) <= 0 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) end - if player:getStorageValue(Storage.Oramond.MissionToTakeRoots) <= 0 then - player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) <= 0 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, 1) end - player:setStorageValue(Storage.Oramond.HarvestedRootCount, player:getStorageValue(Storage.Oramond.HarvestedRootCount) > 0 and player:getStorageValue(Storage.Oramond.HarvestedRootCount) + 1 or 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count, player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) > 0 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) + 1 or 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your harvesting attempt destroyed more of the juicy roots than you could salvage.") item:transform(item.itemid + 2) @@ -35,13 +35,13 @@ function toTakeRoots.onUse(player, item, fromPosition, target, toPosition, isHot item:transform(item.itemid + 2) addEvent(revertRoot, 120000, toPosition, 21107, 21105) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) - if player:getStorageValue(Storage.Oramond.QuestLine) <= 0 then - player:setStorageValue(Storage.Oramond.QuestLine, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) <= 0 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) end - if player:getStorageValue(Storage.Oramond.MissionToTakeRoots) <= 0 then - player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 1) + if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) <= 0 then + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, 1) end - player:setStorageValue(Storage.Oramond.HarvestedRootCount, player:getStorageValue(Storage.Oramond.HarvestedRootCount) > 0 and player:getStorageValue(Storage.Oramond.HarvestedRootCount) + 1 or 1) + player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count, player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) > 0 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) + 1 or 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your harvesting attempt destroyed more of the juicy roots than you could salvage.") item:transform(item.itemid + 2) diff --git a/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua b/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua index 80e45219e2a..46c65505a37 100644 --- a/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua +++ b/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua @@ -2,11 +2,11 @@ local othersEctoplasm = Action() function othersEctoplasm.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 4206 then - if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) ~= 1 then return false end - player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 2) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 2) item:transform(131) target:remove() toPosition:sendMagicEffect(CONST_ME_POFF) diff --git a/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua index c02731008ef..8f2eca8dcc6 100644 --- a/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua +++ b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua @@ -11,10 +11,10 @@ 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 + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) ~= 1 then return false end - player:setStorageValue(Storage.TibiaTales.TheExterminator, 2) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 2) item:transform(2874, 0) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) return true diff --git a/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua b/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua index 5e941bc89d7..ab532eef8fb 100644 --- a/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua +++ b/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua @@ -29,19 +29,19 @@ local positions = { local othersFireBug = Action() function othersFireBug.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 54387 and target.itemid == 22875 then - if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) >= 8 or player:getStorageValue(Storage.FerumbrasAscension.BoneFlute) < 1 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) >= 8 or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFlute) < 1 then return false end - if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) < 0 then - player:setStorageValue(Storage.FerumbrasAscension.BasinCounter, 0) + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) < 0 then + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter, 0) end - if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) == 7 then + if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) == 7 then player:say("You ascended the last basin.", TALKTYPE_MONSTER_SAY) item:remove() - player:setStorageValue(Storage.FerumbrasAscension.MonsterDoor, 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, 1) end target:transform(22876) - player:setStorageValue(Storage.FerumbrasAscension.BasinCounter, player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) + 1) + player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) + 1) toPosition:sendMagicEffect(CONST_ME_FIREAREA) addEvent(revert, 2 * 60 * 1000, toPosition, 22876, 22875) return true diff --git a/data-otservbr-global/scripts/quests/others/actions_holy_water.lua b/data-otservbr-global/scripts/quests/others/actions_holy_water.lua index 37dce9a342c..9db4ff810eb 100644 --- a/data-otservbr-global/scripts/quests/others/actions_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 = { - [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, + [4208] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave1, + [4209] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave2, + [4210] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave3, + [4211] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave4, + [4212] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave5, + [4213] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave6, + [4214] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave7, + [4215] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave8, + [4216] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave9, + [4217] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave10, + [4218] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave11, + [4219] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave12, + [4220] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave13, + [4221] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave14, + [4222] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave15, + [4223] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave16, } local config = { @@ -46,12 +46,11 @@ local config = { local othersHolyWater = Action() function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, isHotkey) - -- Antler Talisman Transformation + -- Transformação do Antler Talisman if target.itemid == config.antler_talisman then - item:transform(config.sacred_antler_talisman) + target:transform(config.sacred_antler_talisman) item:remove(1) - target:remove(1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You besprinkle the antler talisman with holy water. It glittlers faintly") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You besprinkle the antler talisman with holy water. It glitters faintly.") player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) return true @@ -84,19 +83,19 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i -- Rest in Hallowed Ground Quest elseif target.actionid >= 4208 and target.actionid <= 4223 then local graveStorage = storages[target.actionid] - local questline = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) + local questline = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) if player:getStorageValue(graveStorage) == 1 or questline ~= 3 then return false end player:setStorageValue(graveStorage, 1) - local cStorage = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater) + local cStorage = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater) if cStorage < 14 then - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater, math.max(0, cStorage) + 1) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater, math.max(0, cStorage) + 1) elseif cStorage == 14 then - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater, -1) - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 4) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater, -1) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 4) item:transform(2874, 0) end @@ -116,10 +115,10 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i 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 + -- Transformação do Shadow Nexus elseif target.itemid == 7931 then if Game.getStorageValue(GlobalStorage.Inquisition) > 0 then - Game.setStorageValue(GlobalStorage.Inquisition, (Game.getStorageValue(GlobalStorage.Inquisition) - 1)) + Game.setStorageValue(GlobalStorage.Inquisition, Game.getStorageValue(GlobalStorage.Inquisition) - 1) 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) diff --git a/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua b/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua index c6ba00dbd90..641bbf9c953 100644 --- a/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua +++ b/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua @@ -5,14 +5,14 @@ local chests = { local othersSteal = Action() function othersSteal.onUse(player, item, fromPosition, target, toPosition, isHotkey) if chests[item.uid] then - if player:getStorageValue(Storage.QuestChests.StealFromThieves) > 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) > 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It's empty.") return true end local chest = chests[item.uid] player:addItem(chest.itemid, 1) - player:setStorageValue(Storage.QuestChests.StealFromThieves, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a bag.") end diff --git a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_bone.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_bone.lua similarity index 100% rename from data-otservbr-global/scripts/quests/lower_roshamuul/actions_bone.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/actions_bone.lua diff --git a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_chalk.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_chalk.lua similarity index 100% rename from data-otservbr-global/scripts/quests/lower_roshamuul/actions_chalk.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/actions_chalk.lua diff --git a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_gravel.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_gravel.lua similarity index 100% rename from data-otservbr-global/scripts/quests/lower_roshamuul/actions_gravel.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/actions_gravel.lua diff --git a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_mixture.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_mixture.lua similarity index 100% rename from data-otservbr-global/scripts/quests/lower_roshamuul/actions_mixture.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/actions_mixture.lua diff --git a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_mortar.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_mortar.lua similarity index 100% rename from data-otservbr-global/scripts/quests/lower_roshamuul/actions_mortar.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/actions_mortar.lua diff --git a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_resonance_chamber.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_resonance_chamber.lua similarity index 100% rename from data-otservbr-global/scripts/quests/lower_roshamuul/actions_resonance_chamber.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/actions_resonance_chamber.lua diff --git a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua similarity index 66% rename from data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua index 35888d262d8..c511ae3d921 100644 --- a/data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua +++ b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua @@ -1,4 +1,5 @@ local lowerRoshamuulTrough = Action() + function lowerRoshamuulTrough.onUse(player, item, fromPosition, target, toPosition, isHotkey) if (target == nil) or not target:isItem() then return false @@ -7,7 +8,7 @@ function lowerRoshamuulTrough.onUse(player, item, fromPosition, target, toPositi if target:getId() == 20216 then item:transform(2873, 0) toPosition:sendMagicEffect(10) - player:setStorageValue(ROSHAMUUL_MORTAR_THROWN, math.max(0, player:getStorageValue(ROSHAMUUL_MORTAR_THROWN)) + 1) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown, math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) + 1) end return true end diff --git a/data-otservbr-global/scripts/creaturescripts/monster/lower_roshamuul.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/creaturescripts_lower_roshamuul.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/monster/lower_roshamuul.lua rename to data-otservbr-global/scripts/quests/roshamuul_quest/creaturescripts_lower_roshamuul.lua diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua new file mode 100644 index 00000000000..3f112843642 --- /dev/null +++ b/data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua @@ -0,0 +1,50 @@ +local lowerRoshamuul20122 = MoveEvent() + +function lowerRoshamuul20122.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return false + end + + if item:getId() == 20122 then + player:teleportTo(Position(33554, 32546, 7)) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true + end + + return false +end + +lowerRoshamuul20122:type("stepin") +lowerRoshamuul20122:id(20122) +lowerRoshamuul20122:register() + +local roshamuulCaves = { + Position(33560, 32523, 8), + Position(33554, 32543, 8), + Position(33573, 32545, 8), + Position(33543, 32560, 8), + Position(33579, 32565, 8), + Position(33527, 32597, 8), +} + +local lowerRoshamuul1500 = MoveEvent() + +function lowerRoshamuul1500.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return false + end + + if item:getActionId() == 55000 then + player:teleportTo(roshamuulCaves[math.random(#roshamuulCaves)]) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true + end + + return false +end + +lowerRoshamuul1500:type("stepin") +lowerRoshamuul1500:aid(55000) +lowerRoshamuul1500:register() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua index 9301633af95..c97e06e98a4 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua @@ -4,7 +4,7 @@ end local spikeTasksFertilizer = Action() function spikeTasksFertilizer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 4 }, player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN)) then + if table.contains({ -1, 4 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main)) then return false end @@ -22,8 +22,8 @@ function spikeTasksFertilizer.onUse(player, item, fromPosition, target, toPositi end table.insert(FERTILIZED_MUSHROOMS[player:getGuid()], mushPos) - local sum = player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) + 1 - player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, sum) + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, sum) if sum == 4 then item:remove() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua index 8fdadc412e0..8daead707f6 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua @@ -3,8 +3,8 @@ if not GHOST_DETECTOR_MAP then end ghost_detector_area = { - from = Position(32008, 32522, 8), - to = Position(32365, 32759, 10), + from = Position(32171, 32512, 8), + to = Position(32352, 32671, 10), } local function getSearchString(fromPos, toPos) @@ -65,7 +65,7 @@ end local spikeTasksGhost = Action() function spikeTasksGhost.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local stat = player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) + local stat = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) if table.contains({ -1, 3 }, stat) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) @@ -73,22 +73,30 @@ function spikeTasksGhost.onUse(player, item, fromPosition, target, toPosition, i local current = GHOST_DETECTOR_MAP[player:getGuid()] if not current then - local random = Position.getFreeSand() + local levelZ = 8 + stat + local random = Position(math.random(32171, 32352), math.random(32512, 32671), levelZ) GHOST_DETECTOR_MAP[player:getGuid()] = random current = random end - if player:getPosition():compare(current) then + local playerPos = player:getPosition() + local dx = math.abs(playerPos.x - current.x) + local dy = math.abs(playerPos.y - current.y) + local dz = math.abs(playerPos.z - current.z) + + if dx <= 4 and dy <= 4 and dz == 0 then if stat == 2 then item:remove() GHOST_DETECTOR_MAP[player:getGuid()] = nil player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a malignant presence, the glowing detector signals that it does not need any further data.") else - GHOST_DETECTOR_MAP[player:getGuid()] = getFreeSand() + local levelZ = 8 + (stat + 1) % 3 + local random = Position(math.random(32171, 32352), math.random(32512, 32671), levelZ) + GHOST_DETECTOR_MAP[player:getGuid()] = random player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a malignant presence, the glowing detector signals another presence nearby.") end - player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, stat + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, stat + 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The detector points " .. getSearchString(player:getPosition(), current) .. ".") end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua index 16740c7163b..7a3060a1fc9 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua @@ -1,16 +1,13 @@ -local transformTo = { - [19207] = 19216, - [19216] = 19218, -} - -local area = { --area where to teleport +local area = { Position(32152, 32502, 11), Position(32365, 32725, 12), } local spikeTasksStone = Action() + function spikeTasksStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) ~= 0 then + local currentProgress = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) + if currentProgress == 3 then return false end @@ -18,26 +15,43 @@ function spikeTasksStone.onUse(player, item, fromPosition, target, toPosition, i return false end - target:transform(19379) - target:decay() - if item:getId() == 19218 then - player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 1) - player:getPosition():sendMagicEffect(12) - player:say("Your tinkering caused some kind of magnetic storm that caused you to get disorientated.", TALKTYPE_MONSTER_SAY) - item:remove() - else - item:transform(transformTo[item:getId()]) - if math.random(100) > 60 then - player:teleportTo(Position.getFreePosition(area[1], area[2])) - player:getPosition():sendMagicEffect(11) + if target:getId() == 19217 then + target:transform(19379) + target:decay() + end + + local itemId = item:getId() + + if itemId == 19207 then + item:transform(19216) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 1) -- Define o progresso inicial + elseif itemId == 19216 then + local useCount = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) + if useCount == -1 then + useCount = 0 end + + useCount = useCount + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, useCount) + + if useCount == 3 then -- Corrigido para checar se o uso é 3 + item:transform(19218) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 3) -- Finaliza a missão + return true + end + end + + if math.random(100) > 60 then + player:teleportTo(Position.getFreePosition(area[1], area[2])) end + return toPosition:sendMagicEffect(12) end -for itemId, info in pairs(transformTo) do - spikeTasksStone:id(itemId) +local itemIds = { 19207, 19216 } + +for _, id in ipairs(itemIds) do + spikeTasksStone:id(id) end -spikeTasksStone:id(21568) spikeTasksStone:register() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua index 4c55dd1b72a..2e1b2a66e6d 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua @@ -2,7 +2,7 @@ local summon = { "Spider", "Larva", "Scarab", "Tarantula" } local spikeTasksNests = Action() function spikeTasksNests.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 8 }, player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN)) then + if table.contains({ -1, 5 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main)) then return false end @@ -10,11 +10,11 @@ function spikeTasksNests.onUse(player, item, fromPosition, target, toPosition, i return false end - local sum = player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) + 1 - player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, sum) + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have destroyed a monster nest.") - if sum == 8 then + if sum == 5 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnombold.") end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua index 619c93bf024..51979b622ca 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua @@ -8,7 +8,7 @@ local chance = { local spikeTasksShovel = Action() function spikeTasksShovel.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 4 }, player:getStorageValue(SPIKE_UPPER_MOUND_MAIN)) then + if table.contains({ -1, 1 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main)) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end @@ -26,9 +26,9 @@ function spikeTasksShovel.onUse(player, item, fromPosition, target, toPosition, Game.createMonster(result[3], toPosition) end if i == 1 then - local sum = player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) + 1 - player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, sum) - if sum == 4 then + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, sum) + if sum == 1 then item:remove() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua index 9b2c6cbc037..9b95cc083d3 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua @@ -16,7 +16,7 @@ end local spikeTasksThermometer = Action() function spikeTasksThermometer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local status = player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) + local status = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) if table.contains({ -1, 1 }, status) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) @@ -25,7 +25,7 @@ function spikeTasksThermometer.onUse(player, item, fromPosition, target, toPosit if player:getPosition():isInRange(hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][1], hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][2]) then item:remove() player:getPosition():sendMagicEffect(16) - player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Whew! That was that hot, it melted the thermometer! At least you've found the hot spot!") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is not the hot spot!") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua index 55382b260e8..2ae79bd368c 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua @@ -1,6 +1,6 @@ local spikeTasksFork = Action() function spikeTasksFork.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 7 }, player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN)) then + if table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main)) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end @@ -8,8 +8,8 @@ function spikeTasksFork.onUse(player, item, fromPosition, target, toPosition, is return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end - local sum = player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) + 1 - player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, sum) + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, sum) if sum == 7 then item:remove() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua index 16c79963c42..2d4d300fc8c 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua @@ -11,9 +11,9 @@ function lowerSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKil end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(SPIKE_LOWER_KILL_MAIN)) then - local sum = player:getStorageValue(SPIKE_LOWER_KILL_MAIN) + 1 - player:setStorageValue(SPIKE_LOWER_KILL_MAIN, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main)) then + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Drillworms.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomargery.") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua index 2dd6017d106..b047e9d985b 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua @@ -10,9 +10,9 @@ function middleSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKi return true end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN)) then - local sum = player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) + 1 - player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main)) then + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Crystalcrushers.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnombold.") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua index 96f9dc6b397..860b5f6b183 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua @@ -11,9 +11,9 @@ function upperSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKil end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(SPIKE_UPPER_KILL_MAIN)) then - local sum = player:getStorageValue(SPIKE_UPPER_KILL_MAIN) + 1 - player:setStorageValue(SPIKE_UPPER_KILL_MAIN, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main)) then + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Demon Skeletons.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua index 37428f549f7..2b9d58b8414 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua @@ -1,18 +1,21 @@ +local TCC_PILLARPETRIFIED = Position(31942, 32936, 10) local ItemsCursed = { - [11466] = { usedID = 21504, finalID = 21505 }, -- Flask with oil and blood - [21504] = { usedID = 11466, finalID = 21505 }, -- Flask with oil and blood - [21505] = { usedID = 21507, finalID = 21506 }, -- Medusa's oilment - [21507] = { usedID = 21505, finalID = 21506 }, -- Medusa's oilment + [11466] = { usedID = 21504, finalID = 21505 }, + [21504] = { usedID = 11466, finalID = 21505 }, + [21505] = { usedID = 21507, finalID = 21506 }, + [21507] = { usedID = 21505, finalID = 21506 }, } local theCursedMedusa = Action() + function theCursedMedusa.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if (item.itemid == 21506) and (item.itemid == 10420) then - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) == 2 then - if not (((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) < 5) and ((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) > -5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) < 5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) > -5) and (Player(player):getPosition().z == TCC_PILLARPETRIFIED.z)) then + if (item.itemid == 21506) and (target.itemid == 10420) then + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) == 2 then + local playerPos = player:getPosition() + if not ((math.abs(playerPos.x - TCC_PILLARPETRIFIED.x) < 5) and (math.abs(playerPos.y - TCC_PILLARPETRIFIED.y) < 5) and (playerPos.z == TCC_PILLARPETRIFIED.z)) then return end - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 3) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 3) item:remove(1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You unpetrify a banshee's scream near the evil crystal, your ears protected by wax. Thus the baleful artefact is destroyed.") local stone = Tile(TCC_PILLARPETRIFIED):getItemById(10797) @@ -24,47 +27,41 @@ function theCursedMedusa.onUse(player, item, fromPosition, target, toPosition, i end return elseif item.itemid == 9106 then - if not (Tile(topos)) or not (Tile(topos):getTopCreature()) or not (Tile(topos):getTopCreature():isPlayer()) then + local topCreature = Tile(toPosition):getTopCreature() + if not topCreature or not topCreature:isPlayer() then return end - if (Player(player) == Player(Tile(topos):getTopCreature())) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 2) then - if not (((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) < 5) and ((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) > -5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) < 5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) > -5) and (Player(player):getPosition().z == TCC_PILLARPETRIFIED.z)) then + if (player == topCreature) and (player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 2) then + local playerPos = player:getPosition() + if not ((math.abs(playerPos.x - TCC_PILLARPETRIFIED.x) < 5) and (math.abs(playerPos.y - TCC_PILLARPETRIFIED.y) < 5) and (playerPos.z == TCC_PILLARPETRIFIED.z)) then return end - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 2) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You use the molten wax to plug your ears.") doSendMagicEffect(player:getPosition(), CONST_ME_YELLOWSMOKE) item:remove(1) end return end + for index, value in pairs(ItemsCursed) do - if item.itemid == index and item.itemid == value.usedID then + if item.itemid == index and target.itemid == value.usedID then if value.finalID == 21505 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You mixed the first ingredients to create a special ointment. But it isn't complete yet.") elseif value.finalID == 21506 then - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) < 2 then - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 2) + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) < 2 then + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 2) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You mixed the proper ingredients to create a special ointment. With this salve you may unpetrify a petrified object.") end - local topParent = item:getTopParent() - if topParent.isItem and (not topParent:isItem() or topParent.itemid ~= 470) then - local parent = item:getParent() - if not parent:isTile() and (parent:addItem(value.finalID, 1) or topParent:addItem(value.finalID, 1)) then - item:remove(1) - Game.createItem(value.finalID, 1, item:getPosition()) - return true - else - Game.createItem(value.finalID, 1, item:getPosition()) - end - else - Game.createItem(value.finalID, 1, item:getPosition()) - end + item:remove(1) - return + target:remove(1) + player:addItem(value.finalID, 1) + return true end end + player:sendTextMessage(MESSAGE_FAILURE, "Sorry, not possible.") end diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua index fd2e42d286e..43cd52f72ec 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua @@ -1,63 +1,115 @@ -local theCursedMiscItem = Action() -function theCursedMiscItem.onUse(cid, item, frompos, item2, topos) - local user1 = Player(cid) +local cursedMiscItem = Action() + +local MIN_POS_GO = Position(31957, 32935, 9) +local MAX_POS_GO = Position(31966, 32942, 9) + +local validItems = { 4809, 4810, 4811, 4812, 4813 } + +local function isInArea(pos, fromPos, toPos) + return pos.x >= fromPos.x and pos.x <= toPos.x and pos.y >= fromPos.y and pos.y <= toPos.y and pos.z == fromPos.z +end + +local function hasValidItem(position) + local tile = Tile(position) + if tile then + for _, itemId in ipairs(validItems) do + if tile:getItemById(itemId) then + return true + end + end + end + return false +end + +local function isVortexInArea(fromPos, toPos) + for x = fromPos.x, toPos.x do + for y = fromPos.y, toPos.y do + local tile = Tile(Position(x, y, fromPos.z)) + if tile and tile:getItemById(7804) then + return true + end + end + end + return false +end + +function cursedMiscItem.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 5902 then - if (item2.itemid == 2535) or (item2.itemid == 2537) or (item2.itemid == 2539) or (item2.itemid == 2541) then + if (target.itemid == 2535) or (target.itemid == 2537) or (target.itemid == 2539) or (target.itemid == 2541) then item:remove(1) - doPlayerAddItem(cid, 9106, 1) + player:addItem(9106, 1) end - return elseif item.itemid == 21554 then - if (((user1:getPosition().x - TCC_VORTEX_POSITION.x) < 4) and ((user1:getPosition().x - TCC_VORTEX_POSITION.x) > -4)) and (((user1:getPosition().y - TCC_VORTEX_POSITION.y) < 4) and ((user1:getPosition().y - TCC_VORTEX_POSITION.y) > -4)) then - Game.createItem(7804, 1, TCC_VORTEX_POSITION) - Tile(TCC_VORTEX_POSITION):getItemById(7804):setActionId(35001) - doSendMagicEffect(user1:getPosition(), CONST_ME_SOUND_WHITE) - user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "As you use the small bell an unearthly sound rings out sweetly. At the same moment, the lake's waters begin to whirl.") - addEvent(function() - Tile(TCC_VORTEX_POSITION):getItemById(7804):remove() - end, 10000) + local playerPos = player:getPosition() + + if isInArea(playerPos, MIN_POS_GO, MAX_POS_GO) and hasValidItem(playerPos) then + if not isVortexInArea(MIN_POS_GO, MAX_POS_GO) then + Game.createItem(7804, 1, playerPos) + local vortex = Tile(playerPos):getItemById(7804) + + if vortex then + vortex:setActionId(35001) + player:getPosition():sendMagicEffect(CONST_ME_SOUND_WHITE) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "As you use the small bell, an unearthly sound rings out sweetly. At the same moment, the lake's waters begin to whirl.") + + addEvent(function() + local vortexItem = Tile(playerPos):getItemById(7804) + if vortexItem then + vortexItem:remove() + end + end, 10000) + end + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A vortex already exists in this area.") + end end end + + return true end -theCursedMiscItem:id(5902, 21554, 21572) -theCursedMiscItem:register() +cursedMiscItem:id(5902, 21554) +cursedMiscItem:register() + +local TCC_SKELETON_PAPER_POS = Position(31974, 32907, 8) +local TCC_SKELETON_BELL_POS = Position(32031, 32914, 8) local theCursedMiscAction = Action() -function theCursedMiscAction.onUse(cid, item, frompos, item2, topos) - if (item.actionid == 40001) and (item:getPosition() == TCC_SKELETON_PAPER_POS) then -- 40028 - if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 1 then - user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a sheet of paper.") - local paperCursedCrystal = doPlayerAddItem(cid, 2820, 1) - Item(paperCursedCrystal):setAttribute( + +function theCursedMiscAction.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if item.actionid == 40001 and item:getPosition() == TCC_SKELETON_PAPER_POS then + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 1 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper) < 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a sheet of paper.") + local paperCursedCrystal = player:addItem(2820, 1) + paperCursedCrystal:setAttribute( ITEM_ATTRIBUTE_TEXT, - "I did it! I reached the crystal gardens! What beauty and splendor I have seen down there. Even more: I discovered a small subterranean lake - but Harry was there before me. And he did something strange: He ringed a small, transparent looking bell and immediatly a big whirl appeared in the water. I suppose this is the mysterious way deeper into the caves we sought after for so long. But Harry, the coward, didn't dare to dive into the water. Instead he left the caverns and heeded back to the surface. I have to go after him tomorrow. I must have this bell!" + "I did it! I reached the crystal gardens! What beauty and splendor I have seen down there. Even more: I discovered a small subterranean lake - but Harry was there before me. And he did something strange: He ringed a small, transparent looking bell and immediately a big whirl appeared in the water. I suppose this is the mysterious way deeper into the caves we sought after for so long. But Harry, the coward, didn't dare to dive into the water. Instead he left the caverns and headed back to the surface. I must have this bell!" ) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper, 1) else - user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones empty.") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones is empty.") end - return - elseif (item.actionid == 40001) and (item:getPosition() == TCC_SKELETON_BELL_POS) then -- 40029 - if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 1 then - user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a small crystal bell.") - doPlayerAddItem(cid, 21554, 1) - user1:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 1) + elseif item.actionid == 40001 and item:getPosition() == TCC_SKELETON_BELL_POS then + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 1 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell) < 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a small crystal bell.") + player:addItem(21554, 1) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell, 1) else - user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones empty.") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones is empty.") end - return - elseif (item.actionid == 40002) and (item.itemid == 21572) then - if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0 then - if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.MedusaOil) < os.time() then - user1:setStorageValue(Storage.TibiaTales.TheCursedCrystal.MedusaOil, os.time() + 72000) - doPlayerAddItem(cid, 21504, 1) - doSendMagicEffect(item:getPosition(), CONST_ME_MAGIC_RED) - user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You take some blood out of the hollow crystal. Hopefully that it is actually a medusa's blood.") + elseif item.actionid == 40002 and item.itemid == 21572 then + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 1 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper) > 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell) > 0 then + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Time) < os.time() then + player:addItem(21504, 1) + item:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You take some blood out of the hollow crystal. Hopefully it is actually a medusa's blood.") + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 1) end - return end end + + return true end -theCursedMiscAction:id(40001, 40002) +theCursedMiscAction:aid(40001, 40002) theCursedMiscAction:register() diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua index e857ec66253..3dc4a6ddba7 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua @@ -1,15 +1,14 @@ local theCursedOintment = Action() function theCursedOintment.onUse(player, item, frompos, item2, topos) - -- The Cursed Crystal quest: if (item.itemid == 21506) and (item2.itemid == 10420) then - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) == 2 then + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) == 2 then if not (((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) < 5) and ((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) > -5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) < 5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) > -5) and (Player(player):getPosition().z == TCC_PILLARPETRIFIED.z)) then return end - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) < 3 then - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 3) + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) < 3 then + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 3) end - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 3) + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 3) item:remove(1) item2:remove(1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You unpetrify a banshee's scream near the evil crystal, your ears protected by wax. Thus the baleful artefact is destroyed.") diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua index 87d7be27c71..b96f5f3d03b 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua @@ -1,56 +1,56 @@ -local teleports = { - [TCC_MEDUSACRYSTAL_ENTRY_MAP] = { position = TCC_MEDUSACRYSTAL_ENTRY }, -- medusa entry - [TCC_MEDUSACRYSTAL_EXIT_MAP] = { position = TCC_MEDUSACRYSTAL_EXIT }, -- medusa exit - [TCC_VORTEX_POSITION] = { position = TCC_VORTEX_TELEPORTED }, -- Vortex - [TCC_MEDUSAMSG_ONEMAP] = {}, -- medusa crystal message - [TCC_MEDUSAMSG_TWOMAP] = {}, -- medusa crystal message - [TCC_AFTERVORTEX_EXIT_ONE_MAP] = { position = TCC_AFTERVORTEX_EXIT_ONE }, -- Vortex exit 1 - [TCC_AFTERVORTEX_EXIT_TWO_MAP] = { position = TCC_AFTERVORTEX_EXIT_TWO }, -- Vortex exit 2 -} - local StepInCursedCrystal = MoveEvent() +local MIN_POS_GO = Position(31957, 32935, 9) +local MAX_POS_GO = Position(31966, 32942, 9) + +local function isInArea(pos, fromPos, toPos) + return pos.x >= fromPos.x and pos.x <= toPos.x and pos.y >= fromPos.y and pos.y <= toPos.y and pos.z == fromPos.z +end + function StepInCursedCrystal.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return false end - for index, value in pairs(teleports) do - if item:getPosition() == index then - if item:getPosition() == TCC_MEDUSACRYSTAL_ENTRY_MAP then - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0 then - doSendMagicEffect(player:getPosition(), CONST_ME_TELEPORT) - player:teleportTo(value.position) - doSendMagicEffect(value.position, CONST_ME_TELEPORT) - else - nopermission(player, fromPosition) - end - return - elseif item:getPosition() == TCC_MEDUSAMSG_ONEMAP or item:getPosition() == TCC_MEDUSAMSG_TWOMAP then - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.MedusaOil) < os.time() then - if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) == 0 then - player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 1) - end - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This small room could once have been a shrine of some kind. You discover an old inscription between two ornate stone walls.") - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The text is partly crumbled: 'Take ... vial of emb... fl... and mix ... a medusa's bl.... Then .. the dust of ... crystal, so ... will get the Medusa's Ointm... powerful ... able to unpetrify ...") - return - end - else - doSendMagicEffect(player:getPosition(), CONST_ME_TELEPORT) - player:teleportTo(value.position) - doSendMagicEffect(value.position, CONST_ME_TELEPORT) - return + + if item.actionid == 35001 then + local playerPos = player:getPosition() + + if isInArea(playerPos, MIN_POS_GO, MAX_POS_GO) then + player:teleportTo(Position(31961, 32938, 10)) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + else + player:sendCancelMessage("You are not in the correct area.") + end + elseif item.actionid == 25018 then + -- (O código para o actionid 25018 permanece o mesmo) + local playerPos = player:getPosition() + + if playerPos == Position(31973, 32905, 11) then + player:teleportTo(Position(31971, 32904, 10)) + elseif playerPos == Position(31973, 32905, 10) then + player:teleportTo(Position(31975, 32911, 9)) + elseif playerPos == Position(32009, 32928, 9) then + player:teleportTo(Position(32009, 32929, 10)) + elseif playerPos == Position(32009, 32928, 10) then + player:teleportTo(Position(32009, 32929, 9)) + elseif playerPos == Position(32017, 32917, 10) or playerPos == Position(32017, 32918, 10) then + if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) == 0 then + player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 1) end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This small room could once have been a shrine of some kind. You discover an old inscription between two ornate stone walls.") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The text is partly crumbled: 'Take ... vial of emb... fl... and mix ... a medusa's bl.... Then .. the dust of ... crystal, so ... will get the Medusa's Ointm... powerful ... able to unpetrify ...") + return true + else + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end + + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end -end -function nopermission(teleporter, fromthisposition) - teleporter:teleportTo(fromthisposition, false) - doSendMagicEffect(fromthisposition, CONST_ME_TELEPORT) - teleporter:say("You need permision to access this area.", TALKTYPE_MONSTER_SAY) + return true end StepInCursedCrystal:type("stepin") -StepInCursedCrystal:aid(25018, 35001) +StepInCursedCrystal:aid(35001, 25018) StepInCursedCrystal:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_amforas.lua similarity index 70% rename from data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_amforas.lua index fa21b30302e..fd0409e50f8 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_amforas.lua @@ -1,9 +1,9 @@ local gravediggerAmforas = Action() function gravediggerAmforas.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission05) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) ~= 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) ~= 1 then local chances = math.random(30) if chances == 13 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission06, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06, 1) player:say("You've got an amazing heart!", TALKTYPE_MONSTER_SAY) player:getPosition():sendMagicEffect(CONST_ME_HEARTS) player:addItem(19077, 1) diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_ashes.lua similarity index 60% rename from data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_ashes.lua index 7d8ce67c2e4..2f0666aed31 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_ashes.lua @@ -4,8 +4,8 @@ function gravediggerAshes.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission28) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission29) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission29, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission28) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission29) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission29, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The ashes swirl with a life of their own, mixing with the sparks of the altar.") item:remove(1) end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_blood.lua similarity index 57% rename from data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_blood.lua index 7047c57eb0f..3a63c70c89d 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_blood.lua @@ -1,6 +1,6 @@ local config = { - [4644] = { storageKey = { Storage.GravediggerOfDrefia.Mission36, Storage.GravediggerOfDrefia.Mission36a }, message = "The blood in the vial is of a deep, ruby red.", itemId = 21418 }, - [4645] = { storageKey = { Storage.GravediggerOfDrefia.Mission36a, Storage.GravediggerOfDrefia.Mission37 }, message = "The blood in the vial is of a strange colour, as if tainted.", itemId = 21419 }, + [4644] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36a }, message = "The blood in the vial is of a deep, ruby red.", itemId = 19101 }, + [4645] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission37 }, message = "The blood in the vial is of a strange colour, as if tainted.", itemId = 19102 }, } local gravediggerBlood = Action() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bones.lua similarity index 53% rename from data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bones.lua index 7e762e3d2c5..85ec1a05be4 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bones.lua @@ -4,8 +4,8 @@ function gravediggerBones.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission19) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission19, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission19) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission19, 1) player:addItem(19089, 1) item:remove() end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bookcase.lua similarity index 68% rename from data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bookcase.lua index 9d999259a8c..4a5132f80fb 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bookcase.lua @@ -1,7 +1,7 @@ local gravediggerBook = Action() function gravediggerBook.onUse(player, item, fromPosition, itemEx, toPosition) - if player:getStorageValue(Storage.GravediggerOfDrefia.Bookcase) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Bookcase, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Bookcase) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Bookcase, 1) player:addItem(19158, 1) player:say("You have found a crumpled paper.", TALKTYPE_MONSTER_SAY) else diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_brain.lua similarity index 74% rename from data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_brain.lua index 370545b18d7..ab3cc28d95a 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_brain.lua @@ -2,9 +2,9 @@ local gravediggerBrain = Action() function gravediggerBrain.onUse(player, item, fromPosition, target, toPosition, isHotkey) local rightbrain = Tile(Position(33025, 32332, 10)) local leftbrain = Tile(Position(33020, 32332, 10)) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission08) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission09) < 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09) < 1 then if leftbrain:getItemById(9659) and rightbrain:getItemById(9659) then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission09, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " ") leftbrain:getItemById(9659):remove() rightbrain:getItemById(9659):remove() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_caixa.lua similarity index 55% rename from data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_caixa.lua index 421d8585d5b..c21f7d8996f 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_caixa.lua @@ -1,7 +1,7 @@ local gravediggerCaixa = Action() function gravediggerCaixa.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission67) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission68, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found an incantation fragment.") player:addItem(18933, 1) end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_candles.lua similarity index 62% rename from data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_candles.lua index d75088bb5ed..83590484c5a 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_candles.lua @@ -4,8 +4,8 @@ function gravediggerCandles.onUse(player, item, fromPosition, target, toPosition return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission31) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission32) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission32, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Reading the parchment, you identify three human tallow candles and pocket them.") player:addItem(18931, 3) item:remove(1) diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_cape.lua similarity index 58% rename from data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_cape.lua index fe8a07f677f..da540e4e7b4 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_cape.lua @@ -1,7 +1,7 @@ local gravediggerCape = Action() function gravediggerCape.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission60, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You now look like a Necromancer.") player:getPosition():sendMagicEffect(CONST_ME_POFF) player:removeItem(19148, 1) diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_chalk.lua similarity index 63% rename from data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_chalk.lua index ccbdafcace2..6e9f17f1d56 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_chalk.lua @@ -4,8 +4,8 @@ function gravediggerChalk.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission27) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission28) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission28, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission27) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission28) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission28, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The flame wavers as it engulfs the chalk. Strange ashes appear beside it.") Game.createItem(19129, 1, Position(32983, 32376, 11)) item:remove(1) diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua new file mode 100644 index 00000000000..30c7b35ff7c --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua @@ -0,0 +1,19 @@ +local gravediggerFlask = Action() + +function gravediggerFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if not target:isCreature() or target:getName():lower() ~= "snake" then + return false + end + + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission11) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Done! Report back to Omrabas.") + player:addItem(19086, 1) + item:remove() + target:remove() + end + return true +end + +gravediggerFlask:id(19085) +gravediggerFlask:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_hallowed.lua similarity index 61% rename from data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_hallowed.lua index 44064626a23..9f78e921485 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_hallowed.lua @@ -4,8 +4,8 @@ function gravediggerHallowed.onUse(player, item, fromPosition, target, toPositio return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission19) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission20) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission20, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission19) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission20) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission20, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The flames roar and eat the bone hungrily. The Dark Lord is satisfied with your gift") item:remove() end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua new file mode 100644 index 00000000000..feb887d8353 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua @@ -0,0 +1,20 @@ +local gravediggerInscriptions = Action() +function gravediggerInscriptions.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission46) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission46, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to breathe, stangely. One word stays in your mind: bronze") + player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission46) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission47) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission47, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to glow slightly. A name fixes in your mind: Takesha Antishu") + player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission47) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to flutter. One word stays in your mind: floating") + player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) + end + return true +end + +gravediggerInscriptions:aid(4651, 4652, 4653) +gravediggerInscriptions:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key1.lua similarity index 82% rename from data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key1.lua index acfc73a775e..fc2ecbbabcc 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key1.lua @@ -4,7 +4,7 @@ function gravediggerKey1.onUse(player, item, fromPosition, target, toPosition, i return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission31) == 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " ") item:remove(1) Tile(Position(33071, 32442, 11)):getItemById(8708):transform(8709) diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key2.lua similarity index 52% rename from data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key2.lua index ae6a0020793..1957c95bebc 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key2.lua @@ -4,13 +4,13 @@ function gravediggerKey2.onUse(player, item, fromPosition, target, toPosition, i return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission53) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission53, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "An invisible hand pulls you inside.") player:teleportTo(Position({ x = 33011, y = 32392, z = 10 })) player:getPosition():sendMagicEffect(CONST_ME_POFF) - elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission53) == 1 then --and player:getStorageValue(Storage.GravediggerOfDrefia.Mission55) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission55, 1) + elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53) == 1 then --and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Get out of my room!") player:teleportTo(Position({ x = 33008, y = 32392, z = 10 })) player:getPosition():sendMagicEffect(CONST_ME_POFF) @@ -18,5 +18,5 @@ function gravediggerKey2.onUse(player, item, fromPosition, target, toPosition, i return true end -gravediggerKey2:id(21489) +gravediggerKey2:id(19173) gravediggerKey2:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua new file mode 100644 index 00000000000..cef89283d92 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua @@ -0,0 +1,24 @@ +local config = { + [4641] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32a }, message = "Shadows rise and engulf the candle. The statue flickers in an unearthly light." }, + [4642] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32b }, message = "The shadows of the statue swallow the candle hungrily." }, + [4643] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32b, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission33 }, message = "A shade emerges and snatches the candle from your hands." }, +} + +local gravediggerMonks = Action() +function gravediggerMonks.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local targetItem = config[target.actionid] + if not targetItem then + return true + end + + local cStorages = targetItem.storageKey + if player:getStorageValue(cStorages[1]) == 1 and player:getStorageValue(cStorages[2]) < 1 then + player:setStorageValue(cStorages[2], 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, targetItem.message) + item:remove(1) + end + return true +end + +gravediggerMonks:id(18931) +gravediggerMonks:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_palanca.lua similarity index 56% rename from data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_palanca.lua index 7335cf98ba1..eb5a52cb1d4 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_palanca.lua @@ -1,10 +1,12 @@ local gravediggerPalanca = Action() + function gravediggerPalanca.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission39) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission40) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission40, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission39) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " ") player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) end + return true end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids1.lua similarity index 53% rename from data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids1.lua index 686a0917e4d..6cd4808fc9d 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids1.lua @@ -1,8 +1,8 @@ local config = { - [4646] = { Storage.GravediggerOfDrefia.Mission38, Storage.GravediggerOfDrefia.Mission38a }, - [4647] = { Storage.GravediggerOfDrefia.Mission38a, Storage.GravediggerOfDrefia.Mission38b }, - [4648] = { Storage.GravediggerOfDrefia.Mission38b, Storage.GravediggerOfDrefia.Mission38c }, - [4649] = { Storage.GravediggerOfDrefia.Mission38c, Storage.GravediggerOfDrefia.Mission39 }, + [4646] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38a }, + [4647] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38b }, + [4648] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38b, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c }, + [4649] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission39 }, } local gravediggerPyramids1 = Action() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids2.lua similarity index 50% rename from data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids2.lua index 93b6589e764..1e28ebd8b35 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids2.lua @@ -1,9 +1,9 @@ local config = { - [4663] = { Storage.GravediggerOfDrefia.Mission38, Storage.GravediggerOfDrefia.Mission62 }, - [4664] = { Storage.GravediggerOfDrefia.Mission38a, Storage.GravediggerOfDrefia.Mission63 }, - [4665] = { Storage.GravediggerOfDrefia.Mission38b, Storage.GravediggerOfDrefia.Mission64 }, - [4666] = { Storage.GravediggerOfDrefia.Mission38c, Storage.GravediggerOfDrefia.Mission65 }, - [4667] = { Storage.GravediggerOfDrefia.Mission38c, Storage.GravediggerOfDrefia.Mission66 }, + [4663] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission62 }, + [4664] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission63 }, + [4665] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38b, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission64 }, + [4666] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65 }, + [4667] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66 }, } local gravediggerPyramids2 = Action() @@ -23,5 +23,5 @@ function gravediggerPyramids2.onUse(player, item, fromPosition, target, toPositi return true end -gravediggerPyramids2:id(21249) +gravediggerPyramids2:id(18932) gravediggerPyramids2:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_sacrifice.lua similarity index 61% rename from data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_sacrifice.lua index eeae28a1103..1c6fc409291 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_sacrifice.lua @@ -1,16 +1,14 @@ local gravediggerSacrifice = Action() function gravediggerSacrifice.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) == 1 then --and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) < 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) < 1 then + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75) < 1 then local skullItem = Tile(Position(33015, 32418, 11)):getItemById(19160) if skullItem then skullItem:remove() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The scroll burns to dust. The magic stutters. Omrabas' soul flees to his old hideaway.") player:removeItem(18934, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission74, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75, 1) Game.createMonster("Chicken", Position(33015, 32418, 11)) end - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Teste") end return true end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_scroll.lua similarity index 55% rename from data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_scroll.lua index f5243717b84..e9b187040a7 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_scroll.lua @@ -1,8 +1,8 @@ local gravediggerScroll = Action() function gravediggerScroll.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission53) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission54) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission54, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission55, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission54) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission54, 1) + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Somebody left a card. It says: Looking for the scroll? Come find me. Take the stairs next to the students. Dorm.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_statue.lua similarity index 54% rename from data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_statue.lua index da3888a2343..dca0119d990 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_statue.lua @@ -1,14 +1,18 @@ local gravediggerStatue = Action() + function gravediggerStatue.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid ~= 19112 then + local expectedPosition = Position(32998, 32416, 11) + + if toPosition ~= expectedPosition then return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission20) >= 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission25) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission25, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission24) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission25) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission25, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " A slow throbbing, like blood pulsing, runs through the floor.") player:getPosition():sendMagicEffect(CONST_ME_SOUND_GREEN) end + return true end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tears.lua similarity index 59% rename from data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tears.lua index 299c9c5fbca..b88441f3198 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tears.lua @@ -4,8 +4,8 @@ function gravediggerTears.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission14) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission15) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission15, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission15) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission15, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The dragon tears glow and disappear. The old powers are appeased.") item:remove(3) end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tincture.lua similarity index 60% rename from data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tincture.lua index becda5f68ad..83bdd720aeb 100644 --- a/data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tincture.lua @@ -4,8 +4,8 @@ function gravediggerTincture.onUse(player, item, fromPosition, target, toPositio return false end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission23) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission24) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission24, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission23) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission24) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission24, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You crash the vial and spill the blood tincture. This altar is anointed.") item:remove() end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua new file mode 100644 index 00000000000..266c6d738ab --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua @@ -0,0 +1,12 @@ +local creaturescripts_necromancer_servant = CreatureEvent("NecromancerServantDeath") + +function creaturescripts_necromancer_servant.onDeath(creature) + onDeathForDamagingPlayers(creature, function(creature, player) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57, 1) + end + end) + return true +end + +creaturescripts_necromancer_servant:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua index 3173cb23af7..ace4be4c035 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua @@ -6,13 +6,11 @@ function dormitoryTeleport.onStepIn(creature, item, position, fromPosition) return true end - if item.actionid == 4534 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission55) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission56) < 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission56, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission57, 1) + if item.actionid == 4534 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission56) < 1 then + player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission56, 1) player:teleportTo(Position(33015, 32440, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You should hurry, try not to dwell here any longer than a few minutes.") - Game.createMonster("necromancer servant", { x = 33008, y = 32437, z = 11 }) else player:teleportTo(Position(33018, 32437, 10)) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The teleport is accessible only once.") diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua index 194505b3a71..935114e0261 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua @@ -6,12 +6,13 @@ function necromancerServant.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.GravediggerOfDrefia.Mission56) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) ~= 1 then - player:setStorageValue(Storage.GravediggerOfDrefia.Mission57, 1) + if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission56) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) < 1 then Game.createMonster("necromancer servant", Position(33011, 32437, 11)) end + + return true end necromancerServant:type("stepin") -necromancerServant:aid(4541, 4542) +necromancerServant:aid(4536) necromancerServant:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua index 14d98de5393..c4582854abc 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua @@ -1,3 +1,8 @@ +local teleportDestinations = { + [4541] = { position = Position(33017, 32419, 11), storageKey = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74 }, + [4542] = { position = Position(33018, 32425, 11), storageKey = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75 }, +} + local sacrificeTeleport = MoveEvent() function sacrificeTeleport.onStepIn(creature, item, position, fromPosition) @@ -6,16 +11,19 @@ function sacrificeTeleport.onStepIn(creature, item, position, fromPosition) return true end - if item.actionid == 4541 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) == 1 then - player:teleportTo(Position(33015, 32422, 11)) + local destination = teleportDestinations[item.actionid] + if destination and player:getStorageValue(destination.storageKey) == 1 then + player:teleportTo(destination.position) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - else - player:teleportTo(Position(33021, 32419, 11)) - player:getPosition():sendMagicEffect(CONST_ME_POFF) end + return true end sacrificeTeleport:type("stepin") -sacrificeTeleport:aid(4536) + +for actionId in pairs(teleportDestinations) do + sacrificeTeleport:aid(actionId) +end + sacrificeTeleport:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua index ad3f9447859..ca22c669e52 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua @@ -1,13 +1,13 @@ local setting = { [4530] = { - firstStorage = Storage.GravediggerOfDrefia.Mission05, - secondStorage = Storage.GravediggerOfDrefia.Mission06, + firstStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05, + secondStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06, firstDestination = Position(32987, 32401, 9), secondDestination = Position(32988, 32397, 9), }, [4532] = { - storage = Storage.GravediggerOfDrefia.Mission08, - storageTwo = Storage.GravediggerOfDrefia.Mission09, + firstStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08, + secondStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09, firstDestination = Position(33022, 32334, 10), secondDestination = Position(33022, 32338, 10), }, diff --git a/data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua b/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_treasure.lua similarity index 63% rename from data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua rename to data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_treasure.lua index ed866a5e893..4ca6498491a 100644 --- a/data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua +++ b/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_treasure.lua @@ -15,30 +15,26 @@ local items = { } local adventurersTreasure = Action() + function adventurersTreasure.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter) >= 50 then + if player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter) >= 50 then local treasure = items[math.random(#items)] - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is impossible to take along all of the treasures here. Buy you pick out " .. treasure.description) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is impossible to take along all of the treasures here. But you pick out " .. treasure.description) for _, item in ipairs(treasure.items) do player:addItem(item.id, item.count) end - -- reset dragon counter - player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter, 0) - - -- hoard of the dragon achievement - local achievement = getAchievementInfoByName("Hoard of the Dragon") - if not achievement or player:hasAchievement(achievement.id) then - return true - end + player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter, 0) - local times = player:getStorageValue(achievement.actionStorage) - if times < 10 then - player:setStorageValue(achievement.actionStorage, times + 1) + local times = player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.Achievement) + if times < 0 then + times = 0 end + times = times + 1 + player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.Achievement, times) - if times + 1 == 10 then - player:addAchievement(achievement.id) + if times == 10 then + player:addAchievement("Hoard of the Dragon") end else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You try to pick a treasure, but you hear further dragons approaching. You should kill some more before picking out something.") diff --git a/data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua b/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_warrior_skeleton.lua similarity index 52% rename from data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua rename to data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_warrior_skeleton.lua index 73a5d3f8acb..d4ed30749a5 100644 --- a/data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua +++ b/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_warrior_skeleton.lua @@ -1,15 +1,16 @@ local adventurersWarriorSkeleton = Action() + function adventurersWarriorSkeleton.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton) < 1 then + if player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have discovered a deceased warrior's skeleton. It seems he tried to hunt the dragons around here - and failed.") - player:addItem(5882, 1) -- red dragon scale + player:addItem(5882, 1) - if player:getStorageValue(Storage.AdventurersGuild.QuestLine) < 1 then - player:setStorageValue(Storage.AdventurersGuild.QuestLine, 1) + if player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.QuestLine) < 1 then + player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.QuestLine, 1) end - player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, 1) - player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter, 0) + player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, 1) + player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter, 0) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The dead explorer is empty.") end diff --git a/data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua b/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/creaturescripts_the_great_dragon_hunt.lua similarity index 84% rename from data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua rename to data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/creaturescripts_the_great_dragon_hunt.lua index 75cd6f92366..31d88658b3f 100644 --- a/data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua +++ b/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/creaturescripts_the_great_dragon_hunt.lua @@ -21,7 +21,7 @@ function adventurersGuildHunt.onDeath(creature, _corpse, _lastHitKiller, mostDam return true end onDeathForParty(creature, mostDamageKiller, function(creature, player) - player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter, math.max(0, player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter)) + 1) + player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter, math.max(0, player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter)) + 1) end) return true end diff --git a/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua index 38db1e856b2..66569e33a7d 100644 --- a/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua @@ -15,7 +15,7 @@ function pythiusBossTeleport.onStepIn(creature, item, position, fromPosition) end if item.actionid == 50126 then - if player:getStorageValue(Storage.QuestChests.FirewalkerBoots) == 1 or roomIsOccupied() then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.FirewalkerBoots) == 1 or roomIsOccupied() then player:teleportTo(fromPosition, true) fromPosition:sendMagicEffect(CONST_ME_TELEPORT) return true diff --git a/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua b/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua index c2ddb8efcb7..7db346ff3e3 100644 --- a/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua +++ b/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua @@ -6,9 +6,9 @@ function findRemains.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.AdventurersGuild.TheLostBrother) == 1 then + if player:getStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You stumble over some old bones. Something is carved into the stone wall here: 'Tarun, my brother, you were right. She's evil.'") - player:setStorageValue(Storage.AdventurersGuild.TheLostBrother, 2) + player:setStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) end diff --git a/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua index bdecd57c01f..110cc819ec0 100644 --- a/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua +++ b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua @@ -23,7 +23,7 @@ function outlawQuest.onUse(player, item, fromPosition, target, toPosition, isHot end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") player:questKV("outlaw"):set("completed", true) - player:setStorageValue(Storage.QuestChests.OutlawCamp, 1) + player:setStorageValue(Storage.Quest.U6_4.OutlawCampQuest, 1) end return true diff --git a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua index 95f32bfe748..0f7475d10de 100644 --- a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua +++ b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua @@ -1,8 +1,8 @@ local postmanPackage = Action() function postmanPackage.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 101 and target.itemid == 3221 then - if player:getStorageValue(Storage.Postman.Mission09) == 2 then - player:setStorageValue(Storage.Postman.Mission09, 3) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 2 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 3) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) item:transform(2859) end diff --git a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua index 17b032dadf8..a4330a815d6 100644 --- a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua +++ b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua @@ -1,7 +1,7 @@ local postmanWaldos = Action() function postmanWaldos.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Postman.Mission08) == 1 then - player:setStorageValue(Storage.Postman.Mission08, 2) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 1 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 2) player:addItem(3219, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found Waldo's posthorn.") else diff --git a/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua index 816033d902a..a2c9edbb27a 100644 --- a/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua +++ b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua @@ -11,10 +11,10 @@ function geomanticCharges.onStepIn(creature, item, position, fromPosition) end local tasksLoaded = {} - if not table.contains({ -1, 8 }, player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN)) then + if not table.contains({ -1, 8 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main)) then tasksLoaded["NEST"] = true end - if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == 1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == 1 then tasksLoaded["CHARGE"] = true end @@ -34,7 +34,7 @@ function geomanticCharges.onStepIn(creature, item, position, fromPosition) if tasksLoaded["CHARGE"] then player:getPosition():sendMagicEffect(12) - player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 2) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have charged your body with geomantic energy and can report about it.") end return true diff --git a/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua b/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua index 05e7a80e844..d76b2fcd9c9 100644 --- a/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua +++ b/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua @@ -4,12 +4,12 @@ local config = { } local starHerb = Action() + function starHerb.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.itemid == config.antlers then - item:transform(config.antler_talisman) + target:transform(config.antler_talisman) item:remove(1) - target:remove(1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You entwine the antler with fresh star herb") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You entwine the antler with fresh star herb.") player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) end return true diff --git a/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua b/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua index 1e63ccc7b1a..3bdfa5410d1 100644 --- a/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua +++ b/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua @@ -4,8 +4,8 @@ function ultimateBoozer.onUse(player, item, fromPosition, target, toPosition, is return false end - if player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) == 1 then - player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 2) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) == 1 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 2) end player:removeItem(138, 1) player:addItem(136, 1) diff --git a/data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua b/data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua deleted file mode 100644 index 42b97a26622..00000000000 --- a/data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua +++ /dev/null @@ -1,12 +0,0 @@ -local tinderReward = Action() -function tinderReward.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(12450) >= os.time() then - return player:sendCancelMessage("The pile of bones is empty.") - end - player:addItem(20357, 1) - player:setStorageValue(12450, os.time() + 20 * 3600) - return player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tinder box.") -end - -tinderReward:uid(3263) -tinderReward:register() diff --git a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua new file mode 100644 index 00000000000..d9561a07505 --- /dev/null +++ b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua @@ -0,0 +1,23 @@ +local tinderReward = Action() + +function tinderReward.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local currentDate = os.date("*t") + local currentTime = os.time() + + if currentDate.month < 4 or currentDate.month > 5 or (currentDate.month == 5 and currentDate.day > 1) then + return player:sendCancelMessage("This can only be used between 1st of April and 1st of May.") + end + + if player:getStorageValue(Storage.Quest.U10_37.TinderBoxQuestChyllfroest.Reward) >= currentTime then + return player:sendCancelMessage("The pile of bones is empty.") + end + + player:addItem(20357, 1) + player:setStorageValue(Storage.Quest.U10_37.TinderBoxQuestChyllfroest.Reward, currentTime + 72000) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tinder box.") + + return true +end + +tinderReward:uid(3263) +tinderReward:register() diff --git a/data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_tinder_box.lua similarity index 99% rename from data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua rename to data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_tinder_box.lua index cb21dcb9f3c..a796b8bcaeb 100644 --- a/data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua +++ b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_tinder_box.lua @@ -3,7 +3,9 @@ local config = { target = 20356, reward = 20355, } + local tinderBox = Action() + function tinderBox.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == config.item and target.itemid == config.target then item:remove(1) diff --git a/data-otservbr-global/scripts/actions/other/ursagrodon.lua b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua similarity index 71% rename from data-otservbr-global/scripts/actions/other/ursagrodon.lua rename to data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua index b329d7fb7ce..ceebbe1c438 100644 --- a/data-otservbr-global/scripts/actions/other/ursagrodon.lua +++ b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua @@ -3,7 +3,8 @@ local config = { item2 = 20359, item3 = 20360, item4 = 20361, - porcentagem = 30, + percentage = 90, + storageKey = Storage.Quest.U10_37.TinderBoxQuestChyllfroest.Obedience, } local function revertIce(toPosition) @@ -20,18 +21,23 @@ local ursagrodon = Action() function ursagrodon.onUse(player, item, fromPosition, target, toPosition, isHotkey) local rand = math.random(1, 100) + local currentDate = os.date("*t") + + if currentDate.month < 4 or currentDate.month > 5 or (currentDate.month == 5 and currentDate.day > 1) then + return player:sendCancelMessage("This can only be used between 1st of April and 1st of May.") + end if target.itemid == config.item1 or target.itemid == config.item2 or target.itemid == config.item3 then - if player:getStorageValue(config.item4) > 0 then + if player:getStorageValue(config.storageKey) > 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already have the obedience of ursagrodon.") return true end - if rand <= config.porcentagem then + if rand <= config.percentage then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The ice cracked and the frozen creature with it - be more careful next time!") item:remove(1) target:transform(config.item4) - addEvent(revertIce, 600000, toPosition) + addEvent(revertIce, 600 * 1000, toPosition) else if target.itemid == config.item1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You managed to melt about half of the ice blook. Quickly now, it's ice cold here and the ice block could freeze over again.") @@ -40,12 +46,12 @@ function ursagrodon.onUse(player, item, fromPosition, target, toPosition, isHotk player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You managed to melt almost the whole block, only the feet of the creature are still stuck in the ice. Finish the job!") target:transform(config.item3) elseif target.itemid == config.item3 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The freed ursagrodon look at you with glowing, obedient eyes.") target:transform(config.item4) item:remove(1) player:addMount(38) - player:setStorageValue(config.item4, 1) + player:setStorageValue(config.storageKey, 1) addEvent(revertIce, 600 * 1000, toPosition) - return player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The freed ursagrodon look at you with glowing, obedient eyes.") end end end diff --git a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua new file mode 100644 index 00000000000..90c0eb585fd --- /dev/null +++ b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua @@ -0,0 +1,23 @@ +local movements_prohibit_entry = MoveEvent() + +function movements_prohibit_entry.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return false + end + + local currentDate = os.date("*t") + + if currentDate.month < 4 or currentDate.month > 5 or (currentDate.month == 5 and currentDate.day > 1) then + player:teleportTo(Position(32063, 31091, 7)) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot pass here outside the period from April 1st to May 1st.") + return true + end + + return true +end + +movements_prohibit_entry:type("stepin") +movements_prohibit_entry:aid(50000) +movements_prohibit_entry:register() 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 index 95da06446a5..454d1692742 100644 --- 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 @@ -8,13 +8,13 @@ local function revertItem(position, itemId) end function mirror.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.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:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 2) player:say("KABOOM !!", TALKTYPE_MONSTER_SAY, false, player, toPosition) addEvent(revertItem, 60 * 1000, toPosition, 132) item:remove(1) diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index 9ab3ea5a3b1..d5b28c633ed 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -1064,14 +1064,14 @@ ChestUnique = { itemPos = { x = 32782, y = 32910, z = 8 }, reward = { { 4827, 1 } }, weight = 0.20, - storage = Storage.QuestChests.WhisperMoss, + storage = Storage.Quest.U7_6.WhisperMoss, }, [6103] = { -- Ape city itemId = 2473, itemPos = { x = 32935, y = 32886, z = 7 }, reward = { { 4831, 1 } }, weight = 2.00, - storage = Storage.QuestChests.OldParchment, + storage = Storage.Quest.U7_6.OldParchment, }, [6104] = { itemId = 2472, @@ -1770,20 +1770,22 @@ ChestUnique = { }, -- Witch House Quest [6188] = { + useKV = true, itemId = 2472, itemPos = { x = 32867, y = 31909, z = 8 }, weight = 23.30, container = 2853, reward = { { 3027, 2 }, { 3008, 1 }, { 3031, 100 } }, - storage = Storage.QuestChests.WitchHouseQuest, + questName = "WitchHouseQuest", }, -- Simon The Beggar's Favorite Staff [6189] = { + useKV = true, itemId = 2482, itemPos = { x = 33167, y = 31600, z = 15 }, weight = 38.00, reward = { { 6107, 1 } }, - storage = Storage.QuestChests.SimonTheBeggarsFavoriteStaff, + questName = "SimonTheBeggarsFavoriteStaff", }, -- Druid Outfit Quest - Wolf Tooth Chain [6190] = { @@ -2267,14 +2269,14 @@ ChestUnique = { itemPos = { x = 32591, y = 31647, z = 3 }, reward = { { 3425, 1 } }, weight = 55.00, - storage = Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield, }, [6254] = { itemId = 2472, itemPos = { x = 32590, y = 31647, z = 3 }, reward = { { 3282, 1 } }, weight = 54.00, - storage = Storage.TibiaTales.ToBlindTheEnemy.MorningStar, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar, }, [6255] = { itemId = 2434, @@ -2282,7 +2284,7 @@ ChestUnique = { container = 2853, reward = { { 237, 1 }, { 3147, 1 }, { 3059, 1 } }, weight = 31.00, - storage = Storage.TibiaTales.ToBlindTheEnemy.BP1, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP1, }, [6256] = { itemId = 2434, @@ -2290,7 +2292,7 @@ ChestUnique = { container = 2853, reward = { { 3028, 2 }, { 3031, 100 } }, weight = 18.20, - storage = Storage.TibiaTales.ToBlindTheEnemy.BP2, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP2, }, -- To Outfox a Fox Quest [6257] = { @@ -2298,7 +2300,7 @@ ChestUnique = { itemPos = { x = 32467, y = 31970, z = 5 }, reward = { { 139, 1 } }, weight = 7.00, - storage = Storage.TibiaTales.ToOutfoxAFoxQuest.MiningHelmet, + storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.MiningHelmet, }, -- Waterfall Quest [6258] = { @@ -2523,7 +2525,7 @@ ChestUnique = { itemPos = { x = 33004, y = 31530, z = 10 }, reward = { { 11699, 1 } }, weight = 15.00, - storage = Storage.TibiaTales.AnInterestInBotany.BotanyAlmanach, + storage = Storage.Quest.U8_6.AnInterestInBotany.BotanyAlmanach, }, -- Wrath of the Emperor Quest [6297] = { @@ -2564,6 +2566,61 @@ ChestUnique = { reward = { { 3725, 5 } }, questName = "Rookgaard05BrownMushrooms", }, + -- Dark Trails Quest + [6302] = { + itemId = 2469, + itemPos = { x = 33457, y = 32073, z = 8 }, + reward = { { 11450, 1 } }, + weight = 1.00, + storage = Storage.Quest.U10_50.DarkTrails.RewardSmallNotebook, + }, + [6303] = { + itemId = 2478, + itemPos = { x = 33468, y = 32083, z = 8 }, + container = 2853, + reward = { { 21203, 5 }, { 21333, 1 } }, + weight = 189.00, + storage = Storage.Quest.U10_50.DarkTrails.Reward05GlothAndBelongings, + }, + [6304] = { + itemId = 2478, + itemPos = { x = 33487, y = 32085, z = 9 }, + container = 2853, + reward = { { 21203, 10 }, { 21334, 1 } }, + weight = 338.00, + storage = Storage.Quest.U10_50.DarkTrails.Reward10GlothAndBelongings, + }, + -- Nightmare Teddy Quest + [6305] = { + useKV = true, + itemId = 2433, + itemPos = { x = 33444, y = 32605, z = 11 }, + reward = { { 21982, 1 } }, + weight = 6.00, + questName = "NightmareTeddyQuest", + }, + -- Ferumbras' Ascension Quest + [6306] = { + itemId = 1983, + itemPos = { x = 33384, y = 32323, z = 12 }, + reward = { { 22160, 1 } }, + weight = 1.00, + storage = Storage.Quest.U10_90.FerumbrasAscension.TheRiteOfEternalNight, + }, + [6307] = { + itemId = 1986, + itemPos = { x = 33393, y = 32373, z = 11 }, + reward = { { 22158, 1 } }, + weight = 15.00, + storage = Storage.Quest.U10_90.FerumbrasAscension.StoneCoffinsBones, + }, + [6309] = { + itemId = 21818, + itemPos = { x = 33408, y = 32396, z = 11 }, + reward = { { 9685, 1 } }, + weight = 1.00, + storage = Storage.Quest.U10_90.FerumbrasAscension.VampireTeeth, + }, -- 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 d883939842d..0efa3f46cae 100644 --- a/data-otservbr-global/startup/tables/corpse.lua +++ b/data-otservbr-global/startup/tables/corpse.lua @@ -8,13 +8,27 @@ CorpseAction = { itemId = false, itemPos = { { x = xxxxx, y = xxxxx, z = xx } }, }, - -- Others actions -- Threatened dreams quest [20002] = { itemId = 4285, itemPos = { { x = 32949, y = 31810, z = 7 } }, }, + -- The cursed crystal skeletons + [40001] = { + itemId = 4285, + itemPos = { + { x = 31974, y = 32907, z = 8 }, + { x = 32031, y = 32914, z = 8 }, + }, + }, + -- The Great Dragon Hunt Quest + [50806] = { + itemId = 21412, + itemPos = { + { x = 32991, y = 32642, z = 8 }, + }, + }, } CorpseUnique = { @@ -23,6 +37,11 @@ CorpseUnique = { itemId = 4024, itemPos = { x = 32258, y = 31098, z = 10 }, }, + -- Tinder Box Quest - Chyllfroest + [3263] = { + itemId = 4285, + itemPos = { x = 32085, y = 31025, z = 1 }, + }, -- Dark trails (Quandon corpse) -- Path: data\scripts\actions\quests\dark_trails\corpse.lua [20001] = { diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index cf47a12bfe5..3e5888b7399 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.TibiaTales.ToOutfoxAFoxQuest.Questline] = { + [Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline] = { itemId = false, itemPos = { { x = 32467, y = 31969, z = 5 } }, }, @@ -258,15 +258,15 @@ QuestDoorAction = { itemPos = { { x = 33452, y = 32241, z = 7 } }, }, -- Ferumbras ascension door - [Storage.FerumbrasAscension.FirstDoor] = { + [Storage.Quest.U10_90.FerumbrasAscension.FirstDoor] = { itemId = false, itemPos = { { x = 33479, y = 32782, z = 11 } }, }, - [Storage.FerumbrasAscension.MonsterDoor] = { + [Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor] = { itemId = false, itemPos = { { x = 33482, y = 32786, z = 11 } }, }, - [Storage.FerumbrasAscension.TarbazDoor] = { + [Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor] = { itemId = false, itemPos = { { x = 33470, y = 32786, z = 11 } }, }, @@ -289,19 +289,19 @@ QuestDoorAction = { itemPos = { { x = 33046, y = 31302, z = 7 } }, }, -- Dark trails/oramond door - [Storage.Oramond.DoorBeggarKing] = { + [Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door] = { itemId = false, itemPos = { { x = 33573, y = 31982, z = 7 } }, }, - [Storage.Oramond.DoorAbandonedSewer] = { + [Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door] = { itemId = false, itemPos = { { x = 33549, y = 31974, z = 10 } }, }, - [Storage.DarkTrails.DoorQuandon] = { + [Storage.Quest.U10_50.DarkTrails.DoorQuandon] = { itemId = false, itemPos = { { x = 33573, y = 31953, z = 7 } }, }, - [Storage.DarkTrails.DoorHideout] = { + [Storage.Quest.U10_50.DarkTrails.DoorHideout] = { itemId = false, itemPos = { { x = 33666, y = 31924, z = 7 } }, }, @@ -481,19 +481,19 @@ QuestDoorAction = { itemPos = { { x = 32982, y = 31439, z = 3 } }, }, -- Postman door - [Storage.Postman.Mission05] = { + [Storage.Quest.U7_24.ThePostmanMissions.Mission05] = { itemId = false, itemPos = { { x = 32567, y = 32023, z = 6 } }, }, - [Storage.Postman.Mission08] = { + [Storage.Quest.U7_24.ThePostmanMissions.Mission08] = { itemId = false, itemPos = { { x = 32515, y = 32248, z = 8 } }, }, - [Storage.Postman.Mission09] = { + [Storage.Quest.U7_24.ThePostmanMissions.Mission09] = { itemId = false, itemPos = { { x = 32569, y = 32023, z = 6 } }, }, - [Storage.Postman.Door] = { + [Storage.Quest.U7_24.ThePostmanMissions.Door] = { itemId = false, itemPos = { { x = 31921, y = 32652, z = 8 }, @@ -592,11 +592,11 @@ QuestDoorAction = { itemId = false, itemPos = { { x = 32608, y = 31516, z = 14 } }, }, - [Storage.TibiaTales.AnInterestInBotany.ChestDoor] = { + [Storage.Quest.U8_6.AnInterestInBotany.ChestDoor] = { itemId = false, itemPos = { { x = 33007, y = 31536, z = 10 } }, }, - [Storage.TibiaTales.AritosTaskDoor] = { + [Storage.Quest.U8_1.TibiaTales.AritosTaskDoor] = { itemId = false, itemPos = { { x = 33247, y = 32534, z = 8 } }, }, @@ -656,7 +656,7 @@ QuestDoorAction = { }, }, -- Fathers burden door - [Storage.FathersBurden.QuestLog] = { + [Storage.Quest.U8_6.AFathersBurden.QuestLog] = { itemId = false, itemPos = { { x = 31989, y = 31225, z = 7 }, @@ -678,7 +678,7 @@ QuestDoorAction = { itemPos = { { x = 32316, y = 31757, z = 9 } }, }, -- White raven monastery door - [Storage.WhiteRavenMonastery.Door] = { + [Storage.Quest.U7_24.TheWhiteRavenMonastery.Door] = { itemId = false, itemPos = { { x = 32171, y = 31936, z = 7 }, @@ -825,7 +825,7 @@ QuestDoorAction = { itemId = false, itemPos = { { x = 32466, y = 32494, z = 8 } }, }, - [Storage.Quest.U10_80.Grimvale.AncientFeudDoors] = { + [Storage.Quest.U10_80.GrimvaleQuest.AncientFeudDoors] = { itemId = false, itemPos = { { x = 33124, y = 32261, z = 10 }, @@ -833,6 +833,13 @@ QuestDoorAction = { { x = 33159, y = 32322, z = 12 }, }, }, + [Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor] = { + itemId = 22508, + itemPos = { + { x = 33476, y = 32791, z = 11 }, + { x = 33470, y = 32786, z = 11 }, + }, + }, [Storage.Kilmaresh.AccessDoor] = { itemId = false, itemPos = { { x = 33886, y = 31476, z = 7 } }, diff --git a/data-otservbr-global/startup/tables/item.lua b/data-otservbr-global/startup/tables/item.lua index e2f94a88d18..ed01d30aeed 100644 --- a/data-otservbr-global/startup/tables/item.lua +++ b/data-otservbr-global/startup/tables/item.lua @@ -208,6 +208,354 @@ ItemAction = { itemId = 1979, itemPos = { { x = 33217, y = 31661, z = 7 } }, }, + -- Spike Tasks + [4226] = { + itemId = 19387, + itemPos = { { x = 32624, y = 31853, z = 11 } }, + }, + [4227] = { + itemId = 19387, + itemPos = { { x = 32243, y = 32596, z = 8 } }, + }, + [4228] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 8 } }, + }, + [4229] = { + itemId = 19387, + itemPos = { { x = 32226, y = 32595, z = 8 } }, + }, + [4230] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 9 } }, + }, + [4231] = { + itemId = 19387, + itemPos = { { x = 32242, y = 32620, z = 9 } }, + }, + [4232] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 10 } }, + }, + [4233] = { + itemId = 19387, + itemPos = { { x = 32240, y = 32621, z = 10 } }, + }, + [4234] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 11 } }, + }, + [4235] = { + itemId = 19387, + itemPos = { { x = 32226, y = 32598, z = 11 } }, + }, + [4236] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 12 } }, + }, + [4237] = { + itemId = 19387, + itemPos = { { x = 32238, y = 32623, z = 12 } }, + }, + [4238] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 13 } }, + }, + [4239] = { + itemId = 19387, + itemPos = { { x = 32244, y = 32620, z = 13 } }, + }, + [4240] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 14 } }, + }, + [4241] = { + itemId = 19387, + itemPos = { { x = 32244, y = 32587, z = 14 } }, + }, + [4242] = { + itemId = 19387, + itemPos = { { x = 32234, y = 32604, z = 15 } }, + }, + [4243] = { + itemId = 19387, + itemPos = { { x = 32223, y = 32606, z = 15 } }, + }, + -- The Gravedigger of Drefia Quest + [4530] = { + itemId = 1949, + itemPos = { + { x = 32988, y = 32398, z = 9 }, + { x = 32987, y = 32400, z = 9 }, + }, + }, + [4532] = { + itemId = 1949, + itemPos = { + { x = 33022, y = 32337, z = 10 }, + { x = 33022, y = 32335, z = 10 }, + }, + }, + [4534] = { + itemId = 1949, + itemPos = { + { x = 33018, y = 32438, z = 10 }, + }, + }, + [4535] = { + itemId = 1949, + itemPos = { + { x = 33015, y = 32441, z = 10 }, + }, + }, + [4536] = { + itemId = 19147, + itemPos = { + { x = 33015, y = 32438, z = 11 }, + }, + }, + [4541] = { + itemId = 1949, + itemPos = { + { x = 33020, y = 32419, z = 11 }, + }, + }, + [4542] = { + itemId = 1949, + itemPos = { + { x = 33015, y = 32423, z = 11 }, + }, + }, + [4630] = { + itemId = 19075, + itemPos = { + { x = 32975, y = 32421, z = 9 }, + { x = 32970, y = 32420, z = 9 }, + { x = 32969, y = 32421, z = 9 }, + { x = 32974, y = 32425, z = 9 }, + { x = 32977, y = 32425, z = 9 }, + }, + }, + [4631] = { + itemId = false, + itemPos = { + { x = 33022, y = 32329, z = 10 }, + { x = 33023, y = 32329, z = 10 }, + }, + }, + [4632] = { + itemId = 3532, + itemPos = { + { x = 33036, y = 32400, z = 11 }, + }, + }, + [4633] = { + itemId = 19087, + itemPos = { + { x = 33102, y = 32375, z = 10 }, + { x = 33100, y = 32375, z = 10 }, + { x = 33100, y = 32379, z = 10 }, + { x = 33102, y = 32379, z = 10 }, + }, + }, + [4634] = { + itemId = false, + itemPos = { + { x = 33029, y = 32421, z = 11 }, + { x = 33030, y = 32421, z = 11 }, + { x = 33029, y = 32422, z = 11 }, + { x = 33030, y = 32422, z = 11 }, + }, + }, + [4635] = { + itemId = false, + itemPos = { + { x = 32995, y = 32417, z = 11 }, + { x = 32996, y = 32417, z = 11 }, + { x = 32996, y = 32425, z = 11 }, + { x = 32996, y = 32426, z = 11 }, + { x = 33000, y = 32425, z = 11 }, + { x = 33000, y = 32426, z = 11 }, + { x = 33000, y = 32417, z = 11 }, + { x = 33001, y = 32417, z = 11 }, + }, + }, + [4636] = { + itemId = 19112, + itemPos = { + { x = 32998, y = 32416, z = 11 }, + }, + }, + [4637] = { + itemId = false, + itemPos = { + { x = 32983, y = 32376, z = 11 }, + { x = 32983, y = 32377, z = 11 }, + }, + }, + [4638] = { + itemId = false, + itemPos = { + { x = 32993, y = 32401, z = 11 }, + { x = 32994, y = 32401, z = 11 }, + }, + }, + [4639] = { + itemId = 8708, + itemPos = { + { x = 33071, y = 32442, z = 11 }, + }, + }, + [4640] = { + itemId = 19130, + itemPos = { + { x = 33071, y = 32434, z = 12 }, + { x = 33072, y = 32433, z = 12 }, + { x = 33073, y = 32433, z = 12 }, + { x = 33074, y = 32434, z = 12 }, + }, + }, + [4641] = { + itemId = 19131, + itemPos = { + { x = 33012, y = 32388, z = 11 }, + }, + }, + [4642] = { + itemId = 19131, + itemPos = { + { x = 33015, y = 32388, z = 11 }, + }, + }, + [4643] = { + itemId = 19131, + itemPos = { + { x = 33014, y = 32378, z = 11 }, + }, + }, + [4644] = { + itemId = false, + itemPos = { + { x = 33036, y = 32439, z = 10 }, + { x = 33036, y = 32440, z = 10 }, + { x = 33037, y = 32439, z = 10 }, + { x = 33037, y = 32440, z = 10 }, + { x = 33039, y = 32439, z = 10 }, + { x = 33039, y = 32440, z = 10 }, + { x = 33040, y = 32439, z = 10 }, + { x = 33040, y = 32440, z = 10 }, + { x = 33042, y = 32439, z = 10 }, + }, + }, + [4645] = { + itemId = 18615, + itemPos = { + { x = 32929, y = 32446, z = 12 }, + { x = 32929, y = 32449, z = 12 }, + }, + }, + [4646] = { + itemId = 19134, + itemPos = { + { x = 32974, y = 32418, z = 11 }, + }, + }, + [4647] = { + itemId = 19134, + itemPos = { + { x = 32974, y = 32420, z = 11 }, + }, + }, + [4648] = { + itemId = 19134, + itemPos = { + { x = 32970, y = 32420, z = 11 }, + }, + }, + [4649] = { + itemId = 19134, + itemPos = { + { x = 32970, y = 32418, z = 11 }, + }, + }, + [4649] = { + itemId = 19134, + itemPos = { + { x = 32970, y = 32418, z = 11 }, + }, + }, + [4651] = { + itemId = 19142, + itemPos = { + { x = 32952, y = 32384, z = 13 }, + }, + }, + [4652] = { + itemId = 19141, + itemPos = { + { x = 32970, y = 32388, z = 13 }, + }, + }, + [4653] = { + itemId = 19140, + itemPos = { + { x = 32954, y = 32413, z = 13 }, + }, + }, + [4654] = { + itemId = 19099, + itemPos = { + { x = 32990, y = 32452, z = 10 }, + }, + }, + [4661] = { + itemId = 19201, + itemPos = { + { x = 33009, y = 32392, z = 10 }, + }, + }, + [4663] = { + itemId = 19198, + itemPos = { + { x = 33058, y = 32343, z = 10 }, + }, + }, + [4664] = { + itemId = 19199, + itemPos = { + { x = 33073, y = 32333, z = 10 }, + }, + }, + [4665] = { + itemId = 19198, + itemPos = { + { x = 33082, y = 32326, z = 10 }, + }, + }, + [4666] = { + itemId = 19199, + itemPos = { + { x = 33080, y = 32314, z = 10 }, + }, + }, + [4667] = { + itemId = 19199, + itemPos = { + { x = 33088, y = 32338, z = 10 }, + }, + }, + [4668] = { + itemId = 19099, + itemPos = { + { x = 33101, y = 32428, z = 11 }, + }, + }, + [4669] = { + itemId = 2435, + itemPos = { + { x = 32994, y = 32442, z = 11 }, + }, + }, -- In Service of Yalahar Quest [7812] = { itemId = 7804, @@ -476,6 +824,79 @@ ItemAction = { { x = 32741, y = 32382, z = 15 }, }, }, + -- Ferumbras' Ascension Quest + [24837] = { + itemId = 1949, + itemPos = { + { x = 33317, y = 32315, z = 13 }, + }, + }, + [24838] = { + itemId = 1949, + itemPos = { + { x = 33275, y = 32388, z = 8 }, + }, + }, + [24839] = { + itemId = 1949, + itemPos = { + { x = 33482, y = 32775, z = 12 }, + }, + }, + [24840] = { + itemId = 1949, + itemPos = { + { x = 33432, y = 32332, z = 14 }, + }, + }, + [24841] = { + itemId = 1949, + itemPos = { + { x = 33199, y = 31439, z = 13 }, + }, + }, + [24842] = { + itemId = 1949, + itemPos = { + { x = 33402, y = 32406, z = 15 }, + }, + }, + [24843] = { + itemId = 1949, + itemPos = { + { x = 33662, y = 32682, z = 10 }, + }, + }, + [24844] = { + itemId = 1949, + itemPos = { + { x = 33677, y = 32689, z = 13 }, + }, + }, + [24845] = { + itemId = 8280, + itemPos = { + { x = 33477, y = 32698, z = 14 }, + }, + }, + [24846] = { + itemId = 1949, + itemPos = { + { x = 33324, y = 31372, z = 14 }, + }, + }, + -- The Cursed Crystal + [25018] = { + itemId = false, + itemPos = { + { x = 31973, y = 32905, z = 11 }, + { x = 31973, y = 32905, z = 10 }, + { x = 32009, y = 32928, z = 9 }, + { x = 32017, y = 32917, z = 10 }, + { x = 32017, y = 32918, z = 10 }, + { x = 32009, y = 32928, z = 10 }, + }, + }, -- The Pits of Inferno Quest [28810] = { itemId = 353, @@ -634,6 +1055,26 @@ ItemAction = { { x = 32406, y = 32794, z = 9 }, }, }, + -- Ferumbras' Ascension Quest + [34313] = { + itemId = 1949, + itemPos = { + { x = 33637, y = 32650, z = 12 }, + }, + }, + [34314] = { + itemId = 1949, + itemPos = { + { x = 33629, y = 32739, z = 12 }, + }, + }, + [34323] = { + itemId = 1949, + itemPos = { + { x = 33666, y = 32624, z = 11 }, + { x = 33629, y = 32621, z = 11 }, + }, + }, -- The Pits of Inferno [39511] = { itemId = 6433, @@ -641,14 +1082,6 @@ ItemAction = { { x = 32739, y = 32392, z = 14 }, }, }, - -- The cursed crystal skeletons - [40001] = { - itemId = 27490, - itemPos = { - { x = 31974, y = 32907, z = 8 }, - { x = 32031, y = 32914, z = 8 }, - }, - }, [40002] = { -- The cursed crystal red crystal itemId = 21572, itemPos = { { x = 32022, y = 32918, z = 10 } }, @@ -1014,6 +1447,23 @@ ItemAction = { { x = 32652, y = 32200, z = 5 }, }, }, + -- Tinder Box Quest - Event Chyllfroests + [50000] = { + itemId = false, + itemPos = { + { x = 32056, y = 31088, z = 7 }, + { x = 32057, y = 31087, z = 7 }, + { x = 32058, y = 31086, z = 7 }, + { x = 32059, y = 31085, z = 7 }, + { x = 32060, y = 31084, z = 7 }, + { x = 32061, y = 31083, z = 7 }, + { x = 32060, y = 31083, z = 7 }, + { x = 32059, y = 31084, z = 7 }, + { x = 32058, y = 31085, z = 7 }, + { x = 32057, y = 31086, z = 7 }, + { x = 32056, y = 31087, z = 7 }, + }, + }, -- The Pits of Inferno [50082] = { itemId = 2576, @@ -1077,6 +1527,70 @@ ItemAction = { { x = 32788, y = 32227, z = 14 }, }, }, + -- The Great Dragon Hunt Quest + [50808] = { + itemId = false, + itemPos = { + { x = 33010, y = 32638, z = 5 }, + { x = 33039, y = 32652, z = 6 }, + { x = 33010, y = 32687, z = 7 }, + { x = 33037, y = 32662, z = 7 }, + { x = 33078, y = 32657, z = 6 }, + { x = 32994, y = 32625, z = 6 }, + }, + }, + -- Ferumbras' Ascension Quest + [53803] = { + itemId = 22872, + itemPos = { + { x = 33388, y = 32358, z = 11 }, + }, + }, + [53805] = { + itemId = false, + itemPos = { + { x = 33421, y = 32383, z = 12 }, + { x = 33422, y = 32383, z = 12 }, + { x = 33422, y = 32384, z = 12 }, + { x = 33421, y = 32384, z = 12 }, + }, + }, + [53812] = { + itemId = 8646, + itemPos = { + { x = 33626, y = 32621, z = 13 }, + }, + }, + [53813] = { + itemId = 8647, + itemPos = { + { x = 33635, y = 32682, z = 13 }, + }, + }, + [53814] = { + itemId = 8649, + itemPos = { + { x = 33660, y = 32627, z = 13 }, + }, + }, + -- Roshamuul Quest + [55000] = { + itemId = false, + itemPos = { + { x = 33560, y = 32525, z = 7 }, + { x = 33554, y = 32545, z = 7 }, + { x = 33573, y = 32547, z = 7 }, + { x = 33543, y = 32562, z = 7 }, + { x = 33579, y = 32567, z = 7 }, + }, + }, + -- Spike Tasks + [56421] = { + itemId = 1949, + itemPos = { + { x = 32242, y = 32611, z = 11 }, + }, + }, -- The Ice Islands Quest, Nibelor 1: Breaking the Ice [60000] = { itemId = 7185, @@ -1099,6 +1613,11 @@ ItemUnique = { itemId = 8821, itemPos = { x = 32682, y = 31242, z = 6 }, }, + -- Ferumbras' Ascension Quest + [1035] = { + itemId = 4073, + itemPos = { x = 33388, y = 31409, z = 14 }, + }, -- The Ice Islands Quest [1061] = { itemId = 2576, @@ -1570,6 +2089,11 @@ ItemUnique = { itemId = 2753, itemPos = { x = 32933, y = 32495, z = 7 }, }, + -- The Ape City - HolyApeHair + [4663] = { + itemId = 2433, + itemPos = { x = 33017, y = 32358, z = 11 }, + }, -- In Service of Yalahar Quest [7809] = { itemId = 1949, diff --git a/data-otservbr-global/startup/tables/lever.lua b/data-otservbr-global/startup/tables/lever.lua index 3405b60769a..86798188a0a 100644 --- a/data-otservbr-global/startup/tables/lever.lua +++ b/data-otservbr-global/startup/tables/lever.lua @@ -8,6 +8,14 @@ LeverAction = { { x = 32848, y = 32277, z = 9 }, }, }, + -- The Gravedigger of Drefia Quest + [4650] = { + itemId = 9110, + itemPos = { + { x = 32972, y = 32412, z = 11 }, + }, + }, + -- The Pits of Inferno Quest [7799] = { itemId = 431, itemPos = { @@ -163,6 +171,62 @@ LeverAction = { { x = 32600, y = 32105, z = 14 }, }, }, + -- Ferumbras' Ascension Quest + [34305] = { + itemId = 9125, + itemPos = { + { x = 33628, y = 32665, z = 12 }, + }, + }, + [34306] = { + itemId = 9125, + itemPos = { + { x = 33631, y = 32665, z = 12 }, + }, + }, + [34307] = { + itemId = 9125, + itemPos = { + { x = 33628, y = 32683, z = 12 }, + }, + }, + [34308] = { + itemId = 9125, + itemPos = { + { x = 33631, y = 32683, z = 12 }, + }, + }, + [34309] = { + itemId = 9125, + itemPos = { + { x = 33628, y = 32701, z = 12 }, + }, + }, + [34310] = { + itemId = 9125, + itemPos = { + { x = 33631, y = 32701, z = 12 }, + }, + }, + [34311] = { + itemId = 9125, + itemPos = { + { x = 33628, y = 32719, z = 12 }, + }, + }, + [34312] = { + itemId = 9125, + itemPos = { + { x = 33631, y = 32719, z = 12 }, + }, + }, + [34324] = { + itemId = 9125, + itemPos = { + { x = 33628, y = 32616, z = 11 }, + { x = 33671, y = 32623, z = 11 }, + }, + }, -- The Pits of Inferno Quest [50160] = { itemId = 2772, @@ -195,6 +259,63 @@ LeverUnique = { itemId = 2772, itemPos = { x = 33172, y = 31896, z = 8 }, }, + -- Ferumbras' Ascension Quest + [1021] = { + itemId = 8911, + itemPos = { x = 33270, y = 31476, z = 14 }, + }, + [1022] = { + itemId = 8911, + itemPos = { x = 33229, y = 31499, z = 13 }, + }, + [1023] = { + itemId = 8911, + itemPos = { x = 33455, y = 32356, z = 13 }, + }, + [1024] = { + itemId = 8911, + itemPos = { x = 33385, y = 32455, z = 14 }, + }, + [1025] = { + itemId = 8911, + itemPos = { x = 33593, y = 32643, z = 14 }, + }, + [1026] = { + itemId = 8911, + itemPos = { x = 33680, y = 32740, z = 11 }, + }, + [1027] = { + itemId = 8911, + itemPos = { x = 33418, y = 32848, z = 11 }, + }, + [1028] = { + itemId = 8911, + itemPos = { x = 33434, y = 32784, z = 13 }, + }, + [1029] = { + itemId = 8911, + itemPos = { x = 33402, y = 32465, z = 13 }, + }, + [1030] = { + itemId = 8911, + itemPos = { x = 33202, y = 31475, z = 11 }, + }, + [1031] = { + itemId = 8911, + itemPos = { x = 33385, y = 32410, z = 14 }, + }, + [1032] = { + itemId = 8911, + itemPos = { x = 33403, y = 32391, z = 14 }, + }, + [1033] = { + itemId = 8911, + itemPos = { x = 33410, y = 32441, z = 14 }, + }, + [1034] = { + itemId = 8911, + itemPos = { x = 33430, y = 32418, z = 14 }, + }, -- The Pits of Inferno [1037] = { itemId = 2772, diff --git a/data-otservbr-global/startup/tables/teleport.lua b/data-otservbr-global/startup/tables/teleport.lua index e746e98a028..367dc51ba4e 100644 --- a/data-otservbr-global/startup/tables/teleport.lua +++ b/data-otservbr-global/startup/tables/teleport.lua @@ -16,15 +16,6 @@ TeleportAction = { { x = 32208, y = 31134, z = 7 }, }, }, - [35001] = { -- The Cursed Crystal teleports - itemId = 19387, - itemPos = { - { x = 31973, y = 32905, z = 10 }, - { x = 31973, y = 32905, z = 11 }, - { x = 32009, y = 32928, z = 10 }, - { x = 32009, y = 32928, z = 9 }, - }, - }, -- Path: data\scripts\movements\quests\the_queen_of_the_banshees\movement(2)-second_seal_pearl.lua [35002] = { itemId = 1949, diff --git a/data-otservbr-global/world/otservbr-npc.xml b/data-otservbr-global/world/otservbr-npc.xml index 2b3f88a00d7..5a475b8999d 100644 --- a/data-otservbr-global/world/otservbr-npc.xml +++ b/data-otservbr-global/world/otservbr-npc.xml @@ -147,6 +147,9 @@ + + + @@ -588,6 +591,9 @@ + + + @@ -2253,6 +2259,9 @@ + + + diff --git a/data/items/items.xml b/data/items/items.xml index 0afe5ebe858..df8ba8c122d 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -22659,7 +22659,7 @@ - + @@ -39137,7 +39137,7 @@ - + @@ -42064,7 +42064,12 @@ - + + + + + + @@ -44200,7 +44205,7 @@ Awarded by TibiaMisterios.com.br"/> - + @@ -44215,7 +44220,7 @@ Awarded by TibiaMisterios.com.br"/> - + @@ -45287,8 +45292,10 @@ Awarded by TibiaMisterios.com.br"/> + + @@ -64905,7 +64912,7 @@ hands of its owner. Granted by TibiaRoyal.com"/> - + @@ -74917,15 +74924,15 @@ Granted by TibiaGoals.com"/> - + - + - + diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 8dbd0cf9aff..a8497b9bef1 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -158,21 +158,21 @@ function Player.checkGnomeRank(self) end function Player.addFamePoint(self) - local points = self:getStorageValue(SPIKE_FAME_POINTS) + local points = self:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points) local current = math.max(0, points) - self:setStorageValue(SPIKE_FAME_POINTS, current + 1) + self:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points, current + 1) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received a fame point.") end function Player.getFamePoints(self) - local points = self:getStorageValue(SPIKE_FAME_POINTS) + local points = self:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points) return math.max(0, points) end function Player.removeFamePoints(self, amount) - local points = self:getStorageValue(SPIKE_FAME_POINTS) + local points = self:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points) local current = math.max(0, points) - self:setStorageValue(SPIKE_FAME_POINTS, current - amount) + self:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points, current - amount) end function Player.depositMoney(self, amount) From 1d921ae4413cb362dead1f225d0c892523fa0a28 Mon Sep 17 00:00:00 2001 From: kokekanon <114332266+kokekanon@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:12:55 -0300 Subject: [PATCH 15/29] fix: colored text loot in OTC 13.40 (#2929) --- src/creatures/creature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index 438355cbf07..ac85e869605 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -809,7 +809,7 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared auto monster = getMonster(); if (monster && !monster->isRewardBoss()) { std::ostringstream lootMessage; - auto collorMessage = player->getProtocolVersion() > 1200 && player->getOperatingSystem() < CLIENTOS_OTCLIENT_LINUX; + auto collorMessage = player->getProtocolVersion() > 1200; lootMessage << "Loot of " << getNameDescription() << ": " << corpseContainer->getContentDescription(collorMessage) << "."; auto suffix = corpseContainer->getAttribute(ItemAttribute_t::LOOTMESSAGE_SUFFIX); if (!suffix.empty()) { From d94e23a95959c5a411b702961d8d25a7daef8042 Mon Sep 17 00:00:00 2001 From: roberto furtado Date: Wed, 2 Oct 2024 20:13:23 -0300 Subject: [PATCH 16/29] fix: stamina green delay (#2884) --- data/global.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/global.lua b/data/global.lua index 9ea4fd128a9..85987d559d0 100644 --- a/data/global.lua +++ b/data/global.lua @@ -176,7 +176,7 @@ function addStamina(playerId, ...) local actualStamina = player:getStamina() - if actualStamina > 2400 and actualStamina < 2520 then + if actualStamina > 2340 and actualStamina < 2520 then delay = configManager.getNumber(configKeys.STAMINA_GREEN_DELAY) * 60 * 1000 -- Stamina Green 12 min. elseif actualStamina == 2520 then player:sendTextMessage( From f2f52cc2c55fa1db77dfb35e844f5b3546b63008 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Thu, 3 Oct 2024 15:30:46 -0300 Subject: [PATCH 17/29] fix: remove loading of basic info only (#2937) Some database tables are completely deleted to add the "new" one, which replaces the existing data with empty data. In the future I will make an improvement to remove the DELETE FROM and come back with the feature. --- src/game/game.cpp | 4 ++-- src/io/iologindata.cpp | 14 +++++--------- src/io/iologindata.hpp | 6 +++--- src/server/network/protocol/protocolgame.cpp | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index 381792c3092..f6dcd84f75a 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -986,7 +986,7 @@ std::shared_ptr Game::getPlayerByName(const std::string &s, bool allowOf return nullptr; } std::shared_ptr tmpPlayer = std::make_shared(nullptr); - if (!IOLoginData::loadPlayerByName(tmpPlayer, s, allowOffline)) { + if (!IOLoginData::loadPlayerByName(tmpPlayer, s)) { if (!isNewName) { g_logger().error("Failed to load player {} from database", s); } else { @@ -1014,7 +1014,7 @@ std::shared_ptr Game::getPlayerByGUID(const uint32_t &guid, bool allowOf } std::shared_ptr tmpPlayer = std::make_shared(nullptr); - if (!IOLoginData::loadPlayerById(tmpPlayer, guid, false)) { + if (!IOLoginData::loadPlayerById(tmpPlayer, guid)) { return nullptr; } tmpPlayer->setOnline(false); diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index d6873243919..327387106e1 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -92,22 +92,21 @@ void IOLoginData::updateOnlineStatus(uint32_t guid, bool login) { Database::getInstance().executeQuery(query.str()); } -// The boolean "loadBasicInfoOnly" will deactivate the loading of information that is not relevant to the preload, for example, forge, bosstiary, etc. None of this we need to access if the player is offline -bool IOLoginData::loadPlayerById(std::shared_ptr player, uint32_t id, bool loadBasicInfoOnly /* = true*/) { +bool IOLoginData::loadPlayerById(std::shared_ptr player, uint32_t id) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `players` WHERE `id` = " << id; - return loadPlayer(player, db.storeQuery(query.str()), loadBasicInfoOnly); + return loadPlayer(player, db.storeQuery(query.str())); } -bool IOLoginData::loadPlayerByName(std::shared_ptr player, const std::string &name, bool loadBasicInfoOnly /* = true*/) { +bool IOLoginData::loadPlayerByName(std::shared_ptr player, const std::string &name) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `players` WHERE `name` = " << db.escapeString(name); - return loadPlayer(player, db.storeQuery(query.str()), loadBasicInfoOnly); + return loadPlayer(player, db.storeQuery(query.str())); } -bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool loadBasicInfoOnly /* = false*/) { +bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result) { if (!result || !player) { std::string nullptrType = !result ? "Result" : "Player"; g_logger().warn("[{}] - {} is nullptr", __FUNCTION__, nullptrType); @@ -117,9 +116,6 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result try { // First IOLoginDataLoad::loadPlayerBasicInfo(player, result); - if (loadBasicInfoOnly) { - return true; - } // Blessings load IOLoginDataLoad::loadPlayerBlessings(player, result); diff --git a/src/io/iologindata.hpp b/src/io/iologindata.hpp index 26e200cbf2f..014714899b6 100644 --- a/src/io/iologindata.hpp +++ b/src/io/iologindata.hpp @@ -20,9 +20,9 @@ class IOLoginData { static bool gameWorldAuthentication(const std::string &accountDescriptor, const std::string &sessionOrPassword, std::string &characterName, uint32_t &accountId, bool oldProcotol, const uint32_t ip); static uint8_t getAccountType(uint32_t accountId); static void updateOnlineStatus(uint32_t guid, bool login); - static bool loadPlayerById(std::shared_ptr player, uint32_t id, bool loadBasicInfoOnly = true); - static bool loadPlayerByName(std::shared_ptr player, const std::string &name, bool loadBasicInfoOnly = true); - static bool loadPlayer(std::shared_ptr player, DBResult_ptr result, bool loadBasicInfoOnly = false); + static bool loadPlayerById(std::shared_ptr player, uint32_t id); + static bool loadPlayerByName(std::shared_ptr player, const std::string &name); + static bool loadPlayer(std::shared_ptr player, DBResult_ptr result); static bool savePlayer(std::shared_ptr player); static uint32_t getGuidByName(const std::string &name); static bool getGuidByNameEx(uint32_t &guid, bool &specialVip, std::string &name); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index e3d94942670..d90baf33328 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -574,7 +574,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS return; } - if (!IOLoginData::loadPlayerById(player, player->getGUID(), false)) { + if (!IOLoginData::loadPlayerById(player, player->getGUID())) { g_game().removePlayerUniqueLogin(player); disconnectClient("Your character could not be loaded."); g_logger().warn("Player {} could not be loaded", player->getName()); From 80e19d34bf5771cb8f294d6967a2b521e430356e Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sat, 5 Oct 2024 10:41:24 -0300 Subject: [PATCH 18/29] fix: debug build from solution and improve NetworkMessage::add function (#2926) This fixes the issue in the debug build for solution (pch was configured incorrectly) It also fixes a crash that occurred in the debug build with asan. --- src/server/network/message/networkmessage.hpp | 30 +++++++++++++------ vcproj/canary.vcxproj | 3 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/server/network/message/networkmessage.hpp b/src/server/network/message/networkmessage.hpp index 1889b7725b6..caca1247899 100644 --- a/src/server/network/message/networkmessage.hpp +++ b/src/server/network/message/networkmessage.hpp @@ -50,8 +50,7 @@ class NetworkMessage { std::array tempBuffer; // Copy data from the buffer to the temporary array std::span sourceSpan(buffer.data() + info.position, sizeof(T)); - auto it = std::ranges::copy(sourceSpan, tempBuffer.begin()); - g_logger().trace("First value copied from sourceSpan: {}, second value copied from sourceSpan: {}", *it.in, *it.out); + std::ranges::copy(sourceSpan, tempBuffer.begin()); // Update the read position in the buffer info.position += sizeof(T); // Convert the byte array to type T using std::bit_cast and return the result @@ -69,22 +68,35 @@ class NetworkMessage { template void add(T value, std::source_location location = std::source_location::current()) { + static_assert(!std::is_same_v, "Error: get() is not allowed. Use addDouble() instead."); + static_assert(std::is_trivially_copyable_v, "Type T must be trivially copyable"); + if (!canAdd(sizeof(T))) { - g_logger().error("Cannot add value of size {}, buffer overflow", sizeof(T)); + g_logger().error("Cannot add value of size '{}', buffer size: '{}' overflow. Called at line '{}:{}' in '{}'", sizeof(T), buffer.size(), location.line(), location.column(), location.function_name()); return; } - g_logger().trace("[{}] called line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + if (info.position + sizeof(T) > buffer.size()) { + g_logger().error("Buffer overflow detected, current position: '{}', value size: '{}', buffer size: '{}'. Called at line '{}:{}' in '{}'", info.position, sizeof(T), buffer.size(), location.line(), location.column(), location.function_name()); + return; + } - // Ensure that T is trivially copyable - static_assert(std::is_trivially_copyable_v, "Type T must be trivially copyable"); // Convert the value to an array of unsigned char using std::bit_cast auto byteArray = std::bit_cast>(value); + // Create a span from the byte array std::span byteSpan(byteArray); - // Copy the bytes into the buffer - auto it = std::ranges::copy(byteSpan.begin(), byteSpan.end(), buffer.begin() + info.position); - g_logger().trace("First value copied from sourceSpan: {}, second value copied from sourceSpan: {}", *it.in, *it.out); + + // Check if the size of byteSpan can fit into the buffer + if (byteSpan.size() > (buffer.size() - info.position)) { + g_logger().error("Buffer overflow during span copy. Source span size: {}, buffer available space: {}", byteSpan.size(), buffer.size() - info.position); + return; + } + + g_logger().trace("[{}] called at line '{}:{}' in '{}'", __FUNCTION__, location.line(), location.column(), location.function_name()); + + std::ranges::copy(byteSpan, buffer.begin() + info.position); + info.position += sizeof(T); info.length += sizeof(T); } diff --git a/vcproj/canary.vcxproj b/vcproj/canary.vcxproj index eafe0b8000c..d2d8e1646c6 100644 --- a/vcproj/canary.vcxproj +++ b/vcproj/canary.vcxproj @@ -509,7 +509,7 @@ Level1 true stdcpp20 - + pch.hpp true ProgramDatabase true @@ -518,6 +518,7 @@ Default /Zc:__cplusplus /fsanitize=address %(AdditionalOptions) _DISABLE_VECTOR_ANNOTATION;_DISABLE_STRING_ANNOTATION;%(PreprocessorDefinitions) + Use Console From 6fbf5337a48295c3b819e1d23c7e7244a9e7a282 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 13:33:20 -0300 Subject: [PATCH 19/29] fix: login crash and memory corruption (#2951) Fixed memory corruption using debug build in ~Container Fixed memory corruption using debug build in Argon2::parseBitShift Fixed crash on login Resolves #2947 --- src/game/game.cpp | 4 --- src/io/functions/iologindata_load_player.cpp | 3 -- src/io/iologindata.cpp | 18 ++++++++--- src/io/iologindata.hpp | 6 ++-- src/items/containers/container.cpp | 19 +++++++++--- src/security/argon.cpp | 31 +++++++++++++------ src/server/network/message/networkmessage.cpp | 8 ++--- src/server/network/message/networkmessage.hpp | 2 +- src/server/network/protocol/protocolgame.cpp | 2 +- 9 files changed, 58 insertions(+), 35 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index f6dcd84f75a..388cd888b95 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1012,7 +1012,6 @@ std::shared_ptr Game::getPlayerByGUID(const uint32_t &guid, bool allowOf if (!allowOffline) { return nullptr; } - std::shared_ptr tmpPlayer = std::make_shared(nullptr); if (!IOLoginData::loadPlayerById(tmpPlayer, guid)) { return nullptr; @@ -1028,8 +1027,6 @@ std::string Game::getPlayerNameByGUID(const uint32_t &guid) { if (m_playerNameCache.contains(guid)) { return m_playerNameCache.at(guid); } - - // This player need read-only purposes and never saved const auto &player = getPlayerByGUID(guid, true); auto name = player ? player->getName() : ""; if (!name.empty()) { @@ -1069,7 +1066,6 @@ std::vector> Game::getPlayersByAccount(std::shared_ptr> ret; for (const auto &[name, _] : accountPlayers) { const auto &player = getPlayerByName(name, allowOffline); diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp index 3042f4ce03b..64aaa5e6422 100644 --- a/src/io/functions/iologindata_load_player.cpp +++ b/src/io/functions/iologindata_load_player.cpp @@ -182,9 +182,6 @@ bool IOLoginDataLoad::loadPlayerBasicInfo(std::shared_ptr player, DBResu player->setMaxManaShield(result->getNumber("max_manashield")); player->setMarriageSpouse(result->getNumber("marriage_spouse")); - - // Experience load - IOLoginDataLoad::loadPlayerExperience(player, result); return true; } diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index 327387106e1..c32c078218d 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -92,21 +92,22 @@ void IOLoginData::updateOnlineStatus(uint32_t guid, bool login) { Database::getInstance().executeQuery(query.str()); } -bool IOLoginData::loadPlayerById(std::shared_ptr player, uint32_t id) { +// The boolean "disableIrrelevantInfo" will deactivate the loading of information that is not relevant to the preload, for example, forge, bosstiary, etc. None of this we need to access if the player is offline +bool IOLoginData::loadPlayerById(std::shared_ptr player, uint32_t id, bool disableIrrelevantInfo /* = true*/) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `players` WHERE `id` = " << id; - return loadPlayer(player, db.storeQuery(query.str())); + return loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo); } -bool IOLoginData::loadPlayerByName(std::shared_ptr player, const std::string &name) { +bool IOLoginData::loadPlayerByName(std::shared_ptr player, const std::string &name, bool disableIrrelevantInfo /* = true*/) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `players` WHERE `name` = " << db.escapeString(name); - return loadPlayer(player, db.storeQuery(query.str())); + return loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo); } -bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result) { +bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) { if (!result || !player) { std::string nullptrType = !result ? "Result" : "Player"; g_logger().warn("[{}] - {} is nullptr", __FUNCTION__, nullptrType); @@ -117,6 +118,9 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result // First IOLoginDataLoad::loadPlayerBasicInfo(player, result); + // Experience load + IOLoginDataLoad::loadPlayerExperience(player, result); + // Blessings load IOLoginDataLoad::loadPlayerBlessings(player, result); @@ -174,6 +178,10 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result // Load instant spells list IOLoginDataLoad::loadPlayerInstantSpellList(player, result); + if (disableIrrelevantInfo) { + return true; + } + // load forge history IOLoginDataLoad::loadPlayerForgeHistory(player, result); diff --git a/src/io/iologindata.hpp b/src/io/iologindata.hpp index 014714899b6..79fa3b59ad7 100644 --- a/src/io/iologindata.hpp +++ b/src/io/iologindata.hpp @@ -20,9 +20,9 @@ class IOLoginData { static bool gameWorldAuthentication(const std::string &accountDescriptor, const std::string &sessionOrPassword, std::string &characterName, uint32_t &accountId, bool oldProcotol, const uint32_t ip); static uint8_t getAccountType(uint32_t accountId); static void updateOnlineStatus(uint32_t guid, bool login); - static bool loadPlayerById(std::shared_ptr player, uint32_t id); - static bool loadPlayerByName(std::shared_ptr player, const std::string &name); - static bool loadPlayer(std::shared_ptr player, DBResult_ptr result); + static bool loadPlayerById(std::shared_ptr player, uint32_t id, bool disableIrrelevantInfo = true); + static bool loadPlayerByName(std::shared_ptr player, const std::string &name, bool disableIrrelevantInfo = true); + static bool loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo = false); static bool savePlayer(std::shared_ptr player); static uint32_t getGuidByName(const std::string &name); static bool getGuidByNameEx(uint32_t &guid, bool &specialVip, std::string &name); diff --git a/src/items/containers/container.cpp b/src/items/containers/container.cpp index be2e63ae95b..d5dcb08401d 100644 --- a/src/items/containers/container.cpp +++ b/src/items/containers/container.cpp @@ -61,12 +61,21 @@ std::shared_ptr Container::create(std::shared_ptr tile) { Container::~Container() { if (getID() == ITEM_BROWSEFIELD) { - if (getParent() && getParent()->getTile()) { - g_game().browseFields.erase(getParent()->getTile()); - } + auto parent = getParent(); + if (parent) { + auto tile = parent->getTile(); + if (tile) { + auto browseField = g_game().browseFields.find(tile); + if (browseField != g_game().browseFields.end()) { + g_game().browseFields.erase(browseField); + } + } - for (std::shared_ptr item : itemlist) { - item->setParent(getParent()); + for (auto &item : itemlist) { + if (item) { + item->setParent(parent); + } + } } } } diff --git a/src/security/argon.cpp b/src/security/argon.cpp index 41b65b64908..33caaef3efc 100644 --- a/src/security/argon.cpp +++ b/src/security/argon.cpp @@ -25,17 +25,30 @@ void Argon2::updateConstants() { } uint32_t Argon2::parseBitShift(const std::string &bitShiftStr) const { - std::stringstream ss(bitShiftStr); - int base; - int shift; - char op1; - char op2; - - if (!(ss >> base >> op1 >> op2 >> shift) || op1 != '<' || op2 != '<') { - g_logger().warn("Invalid bit shift string"); + static const std::regex pattern(R"(^\s*(\d+)\s*<<\s*(\d+)\s*$)"); + std::smatch match; + + if (!std::regex_match(bitShiftStr, match, pattern)) { + g_logger().warn("Invalid bit shift string format: '{}'", bitShiftStr); + return 0; + } + + int base = 0; + int shift = 0; + try { + base = std::stoi(match[1].str()); + shift = std::stoi(match[2].str()); + } catch (const std::exception &e) { + g_logger().warn("Error parsing bit shift string: '{}'", e.what()); + return 0; + } + + if (shift < 0 || shift >= 32) { + g_logger().warn("Shift value out of bounds: '{}'", shift); + return 0; } - return base << shift; + return static_cast(base) << shift; } bool Argon2::verifyPassword(const std::string &password, const std::string &phash) const { diff --git a/src/server/network/message/networkmessage.cpp b/src/server/network/message/networkmessage.cpp index 3f7147e8411..edce96111cb 100644 --- a/src/server/network/message/networkmessage.cpp +++ b/src/server/network/message/networkmessage.cpp @@ -44,16 +44,16 @@ int32_t NetworkMessage::decodeHeader() { } // Simply read functions for incoming message -uint8_t NetworkMessage::getByte() { +uint8_t NetworkMessage::getByte(const std::source_location &location /*= std::source_location::current()*/) { // Check if there is at least 1 byte to read if (!canRead(1)) { - g_logger().error("[{}] Not enough data to read a byte. Current position: {}, Length: {}", __FUNCTION__, info.position, info.length); + g_logger().error("[{}] Not enough data to read a byte. Current position: {}, Length: {}. Called line {}:{} in {}", __FUNCTION__, info.position, info.length, location.line(), location.column(), location.function_name()); return {}; } // Ensure that position is within bounds before decrementing if (info.position == 0) { - g_logger().error("[{}] Position is at the beginning of the buffer. Cannot decrement.", __FUNCTION__); + g_logger().error("[{}] Position is at the beginning of the buffer. Cannot decrement. Called line {}:{} in {}", __FUNCTION__, location.line(), location.column(), location.function_name()); return {}; } @@ -61,7 +61,7 @@ uint8_t NetworkMessage::getByte() { // Decrement position safely and return the byte return buffer.at(info.position++); } catch (const std::out_of_range &e) { - g_logger().error("[{}] Out of range error: {}. Position: {}, Buffer size: {}", __FUNCTION__, e.what(), info.position, buffer.size()); + g_logger().error("[{}] Out of range error: {}. Position: {}, Buffer size: {}. Called line {}:{} in {}", __FUNCTION__, e.what(), info.position, buffer.size(), location.line(), location.column(), location.function_name()); } return {}; diff --git a/src/server/network/message/networkmessage.hpp b/src/server/network/message/networkmessage.hpp index caca1247899..f738de8506b 100644 --- a/src/server/network/message/networkmessage.hpp +++ b/src/server/network/message/networkmessage.hpp @@ -34,7 +34,7 @@ class NetworkMessage { } // simply read functions for incoming message - uint8_t getByte(); + uint8_t getByte(const std::source_location &location = std::source_location::current()); uint8_t getPreviousByte(); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index d90baf33328..e3d94942670 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -574,7 +574,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS return; } - if (!IOLoginData::loadPlayerById(player, player->getGUID())) { + if (!IOLoginData::loadPlayerById(player, player->getGUID(), false)) { g_game().removePlayerUniqueLogin(player); disconnectClient("Your character could not be loaded."); g_logger().warn("Player {} could not be loaded", player->getName()); From da926743faab3973b65c301270250c9a16932f13 Mon Sep 17 00:00:00 2001 From: Leonardo <130802152+PetryNotak@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:33:31 -0300 Subject: [PATCH 20/29] fix: change mana shield limit (wrong uint16 to uint32) (#2952) --- src/creatures/creature.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/creatures/creature.hpp b/src/creatures/creature.hpp index a274b49364c..4f90fd2de9b 100644 --- a/src/creatures/creature.hpp +++ b/src/creatures/creature.hpp @@ -760,8 +760,8 @@ class Creature : virtual public Thing, public SharedObject { int32_t health = 1000; int32_t healthMax = 1000; - uint16_t manaShield = 0; - uint16_t maxManaShield = 0; + uint32_t manaShield = 0; + uint32_t maxManaShield = 0; int32_t varBuffs[BUFF_LAST + 1] = { 100, 100, 100 }; std::array reflectPercent = { 0 }; From 01e9a8143ad8b6610cb25dcba12cc08b5d503ef8 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 14:59:32 -0300 Subject: [PATCH 21/29] fix: sonarcloud (#2953) --- .github/workflows/analysis-qodana.yml | 68 ----------------------- .github/workflows/analysis-sonarcloud.yml | 41 ++++++++++++-- 2 files changed, 36 insertions(+), 73 deletions(-) delete mode 100644 .github/workflows/analysis-qodana.yml diff --git a/.github/workflows/analysis-qodana.yml b/.github/workflows/analysis-qodana.yml deleted file mode 100644 index a137111df3f..00000000000 --- a/.github/workflows/analysis-qodana.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -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@v4 - with: - 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: 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 - - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@v2024.1 - with: - args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,qodana-base.sarif.json - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/.github/workflows/analysis-sonarcloud.yml b/.github/workflows/analysis-sonarcloud.yml index d742af72625..de011a702e1 100644 --- a/.github/workflows/analysis-sonarcloud.yml +++ b/.github/workflows/analysis-sonarcloud.yml @@ -2,6 +2,13 @@ name: Analysis - SonarCloud on: + pull_request_target: + types: [opened, synchronize, reopened] + paths: + - "src/**" + pull_request: + paths: + - "src/**" push: branches: - main @@ -11,7 +18,7 @@ on: env: VCPKG_BUILD_TYPE: debug CMAKE_BUILD_PARALLEL_LEVEL: 2 - MAKEFLAGS: "-j 2" + MAKEFLAGS: "-j" VCPKG_BINARY_SOURCES: clear;default,readwrite jobs: @@ -21,12 +28,20 @@ jobs: steps: - uses: actions/checkout@v3 + if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + with: + fetch-depth: 0 + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - uses: actions/checkout@v3 + if: ${{ github.event_name == 'push' }} with: fetch-depth: 0 - name: Install Linux Dependencies run: > - sudo apt-get update && sudo apt-get install ccache linux-headers-$(uname -r) + sudo apt-get update && sudo apt-get install ccache linux-headers-"$(uname -r)" - name: CCache id: ccache @@ -49,8 +64,8 @@ jobs: 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 + 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 @@ -66,10 +81,26 @@ jobs: mkdir -p build cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DOPTIONS_ENABLE_CCACHE=ON -DSPEED_UP_BUILD_UNITY=OFF -S . -B build + - name: Run PR sonar-scanner + if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_BRANCH: ${{ github.event.pull_request.head.ref }} + PR_BASE: ${{ github.event.pull_request.base_ref }} + run: | + sonar-scanner \ + --define sonar.cfamily.compile-commands=build/compile_commands.json \ + --define sonar.pullrequest.key=$PR_NUMBER \ + --define sonar.pullrequest.branch=$PR_BRANCH \ + --define sonar.pullrequest.base=$PR_BASE + - name: Run sonar-scanner + if: ${{ github.event_name == 'push' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | sonar-scanner \ - --define sonar.cfamily.compile-commands=build/compile_commands.json + --define sonar.cfamily.compile-commands=build/compile_commands.json \ No newline at end of file From 1fcb348f250bf37f51a5c10a773a24f05583710e Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 15:52:53 -0300 Subject: [PATCH 22/29] fix: sonarcloud check (#2954) --- .github/workflows/analysis-sonarcloud.yml | 106 ------------------- sonar-project.properties | 7 -- src/lua/callbacks/events_callbacks.hpp | 5 +- src/server/network/protocol/protocolgame.cpp | 2 +- src/server/network/protocol/protocolgame.hpp | 4 +- 5 files changed, 6 insertions(+), 118 deletions(-) delete mode 100644 .github/workflows/analysis-sonarcloud.yml delete mode 100644 sonar-project.properties diff --git a/.github/workflows/analysis-sonarcloud.yml b/.github/workflows/analysis-sonarcloud.yml deleted file mode 100644 index de011a702e1..00000000000 --- a/.github/workflows/analysis-sonarcloud.yml +++ /dev/null @@ -1,106 +0,0 @@ ---- -name: Analysis - SonarCloud - -on: - pull_request_target: - types: [opened, synchronize, reopened] - paths: - - "src/**" - pull_request: - paths: - - "src/**" - push: - branches: - - main - paths: - - "src/**" - -env: - VCPKG_BUILD_TYPE: debug - CMAKE_BUILD_PARALLEL_LEVEL: 2 - MAKEFLAGS: "-j" - VCPKG_BINARY_SOURCES: clear;default,readwrite - -jobs: - sonarcloud: - name: SonarCloud - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v3 - if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} - with: - fetch-depth: 0 - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - - uses: actions/checkout@v3 - if: ${{ github.event_name == 'push' }} - with: - fetch-depth: 0 - - - name: Install Linux Dependencies - run: > - sudo apt-get update && sudo apt-get install ccache linux-headers-"$(uname -r)" - - - name: CCache - id: ccache - uses: actions/cache@main - with: - path: $HOME/.ccache - key: ccache-${{ runner.os }}-${{ hashFiles('**/src') }} - restore-keys: | - ccache-${{ runner.os}}- - - - name: Cache SonarCloud packages - uses: actions/cache@main - with: - path: $HOME/.sonar/cache - key: sonar-${{ runner.os}}-${{ hashFiles('**/src') }} - restore-keys: | - sonar-${{ runner.os}}- - - - 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 sonar-scanner - uses: SonarSource/sonarcloud-github-c-cpp@v2 - - - name: Generate compilation database - run: | - mkdir -p build - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DOPTIONS_ENABLE_CCACHE=ON -DSPEED_UP_BUILD_UNITY=OFF -S . -B build - - - name: Run PR sonar-scanner - if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - PR_NUMBER: ${{ github.event.pull_request.number }} - PR_BRANCH: ${{ github.event.pull_request.head.ref }} - PR_BASE: ${{ github.event.pull_request.base_ref }} - run: | - sonar-scanner \ - --define sonar.cfamily.compile-commands=build/compile_commands.json \ - --define sonar.pullrequest.key=$PR_NUMBER \ - --define sonar.pullrequest.branch=$PR_BRANCH \ - --define sonar.pullrequest.base=$PR_BASE - - - name: Run sonar-scanner - if: ${{ github.event_name == 'push' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - sonar-scanner \ - --define sonar.cfamily.compile-commands=build/compile_commands.json \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 1f97551bbe4..00000000000 --- a/sonar-project.properties +++ /dev/null @@ -1,7 +0,0 @@ -sonar.projectKey=opentibiabr_canary -sonar.organization=opentibiabr -sonar.projectName=canary -sonar.projectVersion=1.0 -sonar.sources=./src -sonar.sourceEncoding=UTF-8 -sonar.cfamily.cpp20=true diff --git a/src/lua/callbacks/events_callbacks.hpp b/src/lua/callbacks/events_callbacks.hpp index dff5cec30c5..7a5bbe5484e 100644 --- a/src/lua/callbacks/events_callbacks.hpp +++ b/src/lua/callbacks/events_callbacks.hpp @@ -89,10 +89,10 @@ class EventsCallbacks { template void executeCallback(EventCallback_t eventType, CallbackFunc callbackFunc, Args &&... args) { for (const auto &[name, callback] : getCallbacksByType(eventType)) { - auto argsCopy = std::make_tuple(args...); if (callback && callback->isLoadedCallback()) { + auto argsCopy = std::make_tuple(args...); std::apply( - [&callback, &callbackFunc](auto &&... args) { + [callback, &callbackFunc](auto &&... args) { ((*callback).*callbackFunc)(std::forward(args)...); }, argsCopy @@ -101,6 +101,7 @@ class EventsCallbacks { } } } + /** * @brief Checks if all registered callbacks of the specified event type succeed. * @param eventType The type of event to check. diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index e3d94942670..81de8325cac 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -1883,7 +1883,7 @@ void ProtocolGame::parseQuickLootBlackWhitelist(NetworkMessage &msg) { void ProtocolGame::parseSay(NetworkMessage &msg) { std::string receiver; - uint16_t channelId; + uint16_t channelId {}; SpeakClasses type = static_cast(msg.getByte()); switch (type) { diff --git a/src/server/network/protocol/protocolgame.hpp b/src/server/network/protocol/protocolgame.hpp index fe83ed01cf1..fc27cd3abfc 100644 --- a/src/server/network/protocol/protocolgame.hpp +++ b/src/server/network/protocol/protocolgame.hpp @@ -46,10 +46,10 @@ struct TextMessage { MessageClasses type = MESSAGE_STATUS; std::string text; Position position; - uint16_t channelId; + uint16_t channelId {}; struct { - int32_t value = 0; + int32_t value {}; TextColor_t color = TEXTCOLOR_NONE; } primary, secondary; }; From adbe715d17deb26c6ffe4bb21e1d751b404569ba Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 16:18:53 -0300 Subject: [PATCH 23/29] fix: overload when setting item decay when player logs in (#2927) This change optimizes the decay initiation process for items within containers. Previously, `Container::startDecaying()` method would recursively start the decay for each item in a container upon the container's own decay initiation. This could lead to inefficiencies, especially with many nested containers. The updated approach collects all decaying items in a vector first and then initiates decay after all have been added, improving performance by reducing overhead and simplifying the management of decay states. In the stop decay process, instead of iterating through all containers, we will now halt the decay immediately after each item is saved. This approach leverages an existing function, eliminating the need for an additional overlay and enhancing efficiency. --- src/io/functions/iologindata_load_player.cpp | 54 ++++++++++++-------- src/io/functions/iologindata_save_player.cpp | 5 +- src/items/containers/container.cpp | 14 ----- src/items/containers/container.hpp | 2 - src/items/decay/decay.cpp | 15 ++++-- src/items/decay/decay.hpp | 6 +-- src/map/mapcache.cpp | 4 +- 7 files changed, 55 insertions(+), 45 deletions(-) diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp index 64aaa5e6422..e6c86b70917 100644 --- a/src/io/functions/iologindata_load_player.cpp +++ b/src/io/functions/iologindata_load_player.cpp @@ -475,26 +475,24 @@ void IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, D } bool oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && player->getProtocolVersion() < 1200; - Database &db = Database::getInstance(); - std::ostringstream query; - query << "SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_items` WHERE `player_id` = " << player->getGUID() << " ORDER BY `sid` DESC"; + auto query = fmt::format("SELECT pid, sid, itemtype, count, attributes FROM player_items WHERE player_id = {} ORDER BY sid DESC", player->getGUID()); ItemsMap inventoryItems; std::vector>> openContainersList; + std::vector> itemsToStartDecaying; try { - if ((result = db.storeQuery(query.str()))) { + if ((result = g_database().storeQuery(query))) { loadItems(inventoryItems, result, player); for (ItemsMap::const_reverse_iterator it = inventoryItems.rbegin(), end = inventoryItems.rend(); it != end; ++it) { const std::pair, int32_t> &pair = it->second; - std::shared_ptr item = pair.first; + const std::shared_ptr &item = pair.first; if (!item) { continue; } int32_t pid = pair.second; - if (pid >= CONST_SLOT_FIRST && pid <= CONST_SLOT_LAST) { player->internalAddThing(pid, item); item->startDecaying(); @@ -504,14 +502,15 @@ void IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, D continue; } - std::shared_ptr container = it2->second.first->getContainer(); + const std::shared_ptr &container = it2->second.first->getContainer(); if (container) { container->internalAddThing(item); - item->startDecaying(); + // Here, the sub-containers do not yet have a parent, since the main backpack has not yet been added to the player, so we need to postpone + itemsToStartDecaying.emplace_back(item); } } - std::shared_ptr itemContainer = item->getContainer(); + const std::shared_ptr &itemContainer = item->getContainer(); if (itemContainer) { if (!oldProtocol) { auto cid = item->getAttribute(ItemAttribute_t::OPENCONTAINER); @@ -535,6 +534,11 @@ void IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, D } } + // Now that all items and containers have been added and parent chain is established, start decay + for (const auto &item : itemsToStartDecaying) { + item->startDecaying(); + } + if (!oldProtocol) { std::ranges::sort(openContainersList.begin(), openContainersList.end(), [](const std::pair> &left, const std::pair> &right) { return left.first < right.first; @@ -545,8 +549,9 @@ void IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, D player->onSendContainer(it.second); } } + } catch (const std::exception &e) { - g_logger().error("[IOLoginDataLoad::loadPlayerInventoryItems] - Exceção durante o carregamento do inventário: {}", e.what()); + g_logger().error("[IOLoginDataLoad::loadPlayerInventoryItems] - Exception during inventory loading: {}", e.what()); } } @@ -585,11 +590,10 @@ void IOLoginDataLoad::loadPlayerDepotItems(std::shared_ptr player, DBRes return; } - Database &db = Database::getInstance(); ItemsMap depotItems; - std::ostringstream query; - query << "SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_depotitems` WHERE `player_id` = " << player->getGUID() << " ORDER BY `sid` DESC"; - if ((result = db.storeQuery(query.str()))) { + std::vector> itemsToStartDecaying; + auto query = fmt::format("SELECT pid, sid, itemtype, count, attributes FROM player_depotitems WHERE player_id = {} ORDER BY sid DESC", player->getGUID()); + if ((result = g_database().storeQuery(query))) { loadItems(depotItems, result, player); for (ItemsMap::const_reverse_iterator it = depotItems.rbegin(), end = depotItems.rend(); it != end; ++it) { const std::pair, int32_t> &pair = it->second; @@ -611,11 +615,17 @@ void IOLoginDataLoad::loadPlayerDepotItems(std::shared_ptr player, DBRes std::shared_ptr container = it2->second.first->getContainer(); if (container) { container->internalAddThing(item); - item->startDecaying(); + // Here, the sub-containers do not yet have a parent, since the main backpack has not yet been added to the player, so we need to postpone + itemsToStartDecaying.emplace_back(item); } } } } + + // Now that all items and containers have been added and parent chain is established, start decay + for (const auto &item : itemsToStartDecaying) { + item->startDecaying(); + } } void IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBResult_ptr result) { @@ -624,10 +634,9 @@ void IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBRes return; } - Database &db = Database::getInstance(); - std::ostringstream query; - query << "SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_inboxitems` WHERE `player_id` = " << player->getGUID() << " ORDER BY `sid` DESC"; - if ((result = db.storeQuery(query.str()))) { + std::vector> itemsToStartDecaying; + auto query = fmt::format("SELECT pid, sid, itemtype, count, attributes FROM player_inboxitems WHERE player_id = {} ORDER BY sid DESC", player->getGUID()); + if ((result = g_database().storeQuery(query))) { ItemsMap inboxItems; loadItems(inboxItems, result, player); @@ -647,11 +656,16 @@ void IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBRes std::shared_ptr container = it2->second.first->getContainer(); if (container) { container->internalAddThing(item); - item->startDecaying(); + itemsToStartDecaying.emplace_back(item); } } } } + + // Now that all items and containers have been added and parent chain is established, start decay + for (const auto &item : itemsToStartDecaying) { + item->startDecaying(); + } } void IOLoginDataLoad::loadPlayerStorageMap(std::shared_ptr player, DBResult_ptr result) { diff --git a/src/io/functions/iologindata_save_player.cpp b/src/io/functions/iologindata_save_player.cpp index 9ff8fe94f64..52ea53aaf28 100644 --- a/src/io/functions/iologindata_save_player.cpp +++ b/src/io/functions/iologindata_save_player.cpp @@ -89,7 +89,7 @@ bool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockL } // Loop through items in container - for (std::shared_ptr item : container->getItemList()) { + for (auto &item : container->getItemList()) { if (!item) { continue; // Check for null item } @@ -97,7 +97,7 @@ bool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockL ++runningId; // Update sub-container attributes if necessary - std::shared_ptr subContainer = item->getContainer(); + const auto &subContainer = item->getContainer(); if (subContainer) { queue.emplace_back(subContainer, runningId); if (subContainer->getAttribute(ItemAttribute_t::OPENCONTAINER) > 0) { @@ -121,6 +121,7 @@ bool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockL try { propWriteStream.clear(); item->serializeAttr(propWriteStream); + item->stopDecaying(); } catch (...) { g_logger().error("Error serializing item attributes in container."); return false; diff --git a/src/items/containers/container.cpp b/src/items/containers/container.cpp index d5dcb08401d..802f9d9063f 100644 --- a/src/items/containers/container.cpp +++ b/src/items/containers/container.cpp @@ -904,20 +904,6 @@ void Container::internalAddThing(uint32_t, std::shared_ptr thing) { updateItemWeight(item->getWeight()); } -void Container::startDecaying() { - g_decay().startDecay(getContainer()); - for (ContainerIterator it = iterator(); it.hasNext(); it.advance()) { - g_decay().startDecay(*it); - } -} - -void Container::stopDecaying() { - g_decay().stopDecay(getContainer()); - for (ContainerIterator it = iterator(); it.hasNext(); it.advance()) { - g_decay().stopDecay(*it); - } -} - uint16_t Container::getFreeSlots() { uint16_t counter = std::max(0, capacity() - size()); diff --git a/src/items/containers/container.hpp b/src/items/containers/container.hpp index 6bfb509b8d3..6ef2daa7860 100644 --- a/src/items/containers/container.hpp +++ b/src/items/containers/container.hpp @@ -166,8 +166,6 @@ class Container : public Item, public Cylinder { void internalAddThing(std::shared_ptr thing) override final; void internalAddThing(uint32_t index, std::shared_ptr thing) override final; - void startDecaying() override; - void stopDecaying() override; virtual void removeItem(std::shared_ptr thing, bool sendUpdateToClient = false); diff --git a/src/items/decay/decay.cpp b/src/items/decay/decay.cpp index bdf9ed36040..58bd6095340 100644 --- a/src/items/decay/decay.cpp +++ b/src/items/decay/decay.cpp @@ -17,7 +17,7 @@ Decay &Decay::getInstance() { return inject(); } -void Decay::startDecay(std::shared_ptr item) { +void Decay::startDecay(const std::shared_ptr &item) { if (!item) { return; } @@ -32,6 +32,8 @@ void Decay::startDecay(std::shared_ptr item) { return; } + g_logger().trace("Try decay item {}", item->getName()); + const auto duration = item->getAttribute(ItemAttribute_t::DURATION); if (duration <= 0 && item->hasAttribute(ItemAttribute_t::DURATION)) { internalDecayItem(item); @@ -63,7 +65,10 @@ void Decay::startDecay(std::shared_ptr item) { } } -void Decay::stopDecay(std::shared_ptr item) { +void Decay::stopDecay(const std::shared_ptr &item) { + if (!item) { + return; + } if (item->hasAttribute(ItemAttribute_t::DECAYSTATE)) { auto timestamp = item->getAttribute(ItemAttribute_t::DURATION_TIMESTAMP); if (item->hasAttribute(ItemAttribute_t::DURATION_TIMESTAMP)) { @@ -146,7 +151,11 @@ void Decay::checkDecay() { } } -void Decay::internalDecayItem(std::shared_ptr item) { +void Decay::internalDecayItem(const std::shared_ptr &item) { + if (!item) { + return; + } + const ItemType &it = Item::items[item->getID()]; // 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 if (it.id == it.transformEquipTo || it.id == it.transformDeEquipTo) { diff --git a/src/items/decay/decay.hpp b/src/items/decay/decay.hpp index e2916f6134f..cce3b8b78d5 100644 --- a/src/items/decay/decay.hpp +++ b/src/items/decay/decay.hpp @@ -20,12 +20,12 @@ class Decay { static Decay &getInstance(); - void startDecay(std::shared_ptr item); - void stopDecay(std::shared_ptr item); + void startDecay(const std::shared_ptr &item); + void stopDecay(const std::shared_ptr &item); private: void checkDecay(); - void internalDecayItem(std::shared_ptr item); + void internalDecayItem(const std::shared_ptr &item); uint32_t eventId { 0 }; // order is important, so we use an std::map diff --git a/src/map/mapcache.cpp b/src/map/mapcache.cpp index 33a069f5ae9..bad1315113c 100644 --- a/src/map/mapcache.cpp +++ b/src/map/mapcache.cpp @@ -93,7 +93,9 @@ std::shared_ptr MapCache::createItem(const std::shared_ptr &Bas item->setItemCount(1); } - item->startDecaying(); + if (item->canDecay()) { + item->startDecaying(); + } item->loadedFromMap = true; item->decayDisabled = Item::items[item->getID()].decayTo != -1; From 90e205d7b37cc0f7cc4844b37ef523a9dd9e1e11 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 17:01:49 -0300 Subject: [PATCH 24/29] improve: config manager context from string to source location (#2955) Change from std::string hardcoded to std::source_location from ConfigManager functions (getNumber, getString, getBoolean, getFloat) In addition to displaying the exact line from the log, this approach is also more concise as it eliminates the need to pass a second argument. --- src/canary_server.cpp | 38 ++--- src/config/configmanager.cpp | 18 +-- src/config/configmanager.hpp | 8 +- src/creatures/appearance/mounts/mounts.cpp | 4 +- src/creatures/appearance/outfit/outfit.cpp | 4 +- src/creatures/combat/combat.cpp | 12 +- src/creatures/combat/condition.cpp | 8 +- src/creatures/combat/spells.cpp | 8 +- src/creatures/creature.cpp | 8 +- src/creatures/interactions/chat.cpp | 2 +- src/creatures/monsters/monster.cpp | 8 +- src/creatures/monsters/monsters.hpp | 6 +- .../monsters/spawns/spawn_monster.cpp | 6 +- src/creatures/npcs/npc.cpp | 4 +- src/creatures/npcs/npcs.cpp | 4 +- src/creatures/players/grouping/familiars.cpp | 2 +- src/creatures/players/grouping/groups.cpp | 2 +- src/creatures/players/grouping/party.cpp | 14 +- .../players/imbuements/imbuements.cpp | 4 +- src/creatures/players/management/waitlist.cpp | 2 +- src/creatures/players/player.cpp | 146 +++++++++--------- src/creatures/players/player.hpp | 29 ++-- src/creatures/players/storages/storages.cpp | 2 +- src/creatures/players/vocations/vocation.cpp | 2 +- src/creatures/players/vocations/vocation.hpp | 12 +- src/creatures/players/wheel/player_wheel.cpp | 6 +- src/database/database.cpp | 2 +- src/database/databasemanager.cpp | 8 +- src/game/bank/bank.cpp | 2 +- src/game/functions/game_reload.cpp | 10 +- src/game/game.cpp | 118 +++++++------- src/game/scheduling/events_scheduler.cpp | 2 +- src/game/scheduling/save_manager.cpp | 4 +- src/io/functions/iologindata_load_player.cpp | 18 +-- src/io/functions/iologindata_save_player.cpp | 4 +- src/io/iologindata.cpp | 2 +- src/io/iomap.hpp | 8 +- src/io/iomapserialize.cpp | 4 +- src/io/iomarket.cpp | 14 +- src/io/ioprey.cpp | 44 +++--- src/items/bed.cpp | 4 +- src/items/containers/container.cpp | 8 +- src/items/functions/item/item_parse.cpp | 6 +- src/items/item.hpp | 28 ++-- src/items/items.cpp | 4 +- src/items/items.hpp | 8 +- src/items/tile.cpp | 8 +- src/items/weapons/weapons.cpp | 12 +- src/lua/creature/actions.cpp | 12 +- src/lua/creature/events.cpp | 4 +- src/lua/creature/raids.cpp | 12 +- .../functions/core/game/config_functions.cpp | 8 +- .../functions/core/game/global_functions.cpp | 6 +- .../creatures/creature_functions.cpp | 2 +- .../creatures/monster/monster_functions.cpp | 2 +- .../monster/monster_type_functions.cpp | 2 +- .../creatures/npc/npc_type_functions.cpp | 2 +- src/lua/functions/map/house_functions.cpp | 6 +- src/lua/functions/map/position_functions.cpp | 6 +- src/lua/global/baseevents.cpp | 2 +- src/lua/scripts/scripts.cpp | 8 +- src/map/house/house.cpp | 24 +-- src/map/house/housetile.cpp | 4 +- src/map/map.cpp | 12 +- src/security/argon.cpp | 6 +- src/server/network/connection/connection.cpp | 4 +- src/server/network/protocol/protocol.cpp | 2 +- src/server/network/protocol/protocolgame.cpp | 96 ++++++------ src/server/network/protocol/protocollogin.cpp | 10 +- .../network/protocol/protocolstatus.cpp | 58 +++---- src/server/network/webhook/webhook.cpp | 10 +- src/server/server.cpp | 4 +- src/server/signals.cpp | 2 +- 73 files changed, 490 insertions(+), 491 deletions(-) diff --git a/src/canary_server.cpp b/src/canary_server.cpp index f46d34f7104..7606a026362 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -58,16 +58,16 @@ int CanaryServer::run() { try { loadConfigLua(); - logger.info("Server protocol: {}.{}{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER, g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) ? " and 10x allowed!" : ""); + logger.info("Server protocol: {}.{}{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER, g_configManager().getBoolean(OLD_PROTOCOL) ? " and 10x allowed!" : ""); #ifdef FEATURE_METRICS metrics::Options metricsOptions; - metricsOptions.enablePrometheusExporter = g_configManager().getBoolean(METRICS_ENABLE_PROMETHEUS, __FUNCTION__); + metricsOptions.enablePrometheusExporter = g_configManager().getBoolean(METRICS_ENABLE_PROMETHEUS); if (metricsOptions.enablePrometheusExporter) { - metricsOptions.prometheusOptions.url = g_configManager().getString(METRICS_PROMETHEUS_ADDRESS, __FUNCTION__); + metricsOptions.prometheusOptions.url = g_configManager().getString(METRICS_PROMETHEUS_ADDRESS); } - metricsOptions.enableOStreamExporter = g_configManager().getBoolean(METRICS_ENABLE_OSTREAM, __FUNCTION__); + metricsOptions.enableOStreamExporter = g_configManager().getBoolean(METRICS_ENABLE_OSTREAM); if (metricsOptions.enableOStreamExporter) { - metricsOptions.ostreamOptions.export_interval_millis = std::chrono::milliseconds(g_configManager().getNumber(METRICS_OSTREAM_INTERVAL, __FUNCTION__)); + metricsOptions.ostreamOptions.export_interval_millis = std::chrono::milliseconds(g_configManager().getNumber(METRICS_OSTREAM_INTERVAL)); } g_metrics().init(metricsOptions); #endif @@ -98,7 +98,7 @@ int CanaryServer::run() { g_game().start(&serviceManager); g_game().setGameState(GAME_STATE_NORMAL); - if (g_configManager().getBoolean(TOGGLE_MAINTAIN_MODE, __FUNCTION__)) { + if (g_configManager().getBoolean(TOGGLE_MAINTAIN_MODE)) { g_game().setGameState(GAME_STATE_CLOSED); g_logger().warn("Initialized in maintain mode!"); g_webhook().sendMessage(":yellow_square: Server is now **online** _(access restricted to staff)_"); @@ -132,7 +132,7 @@ int CanaryServer::run() { return EXIT_FAILURE; } - logger.info("{} {}", g_configManager().getString(SERVER_NAME, __FUNCTION__), "server online!"); + logger.info("{} {}", g_configManager().getString(SERVER_NAME), "server online!"); serviceManager.run(); @@ -141,7 +141,7 @@ int CanaryServer::run() { } void CanaryServer::setWorldType() { - const std::string worldType = asLowerCaseString(g_configManager().getString(WORLD_TYPE, __FUNCTION__)); + const std::string worldType = asLowerCaseString(g_configManager().getString(WORLD_TYPE)); if (worldType == "pvp") { g_game().setWorldType(WORLD_TYPE_PVP); } else if (worldType == "no-pvp") { @@ -152,7 +152,7 @@ void CanaryServer::setWorldType() { throw FailedToInitializeCanary( fmt::format( "Unknown world type: {}, valid world types are: pvp, no-pvp and pvp-enforced", - g_configManager().getString(WORLD_TYPE, __FUNCTION__) + g_configManager().getString(WORLD_TYPE) ) ); } @@ -162,11 +162,11 @@ void CanaryServer::setWorldType() { void CanaryServer::loadMaps() const { try { - g_game().loadMainMap(g_configManager().getString(MAP_NAME, __FUNCTION__)); + g_game().loadMainMap(g_configManager().getString(MAP_NAME)); // If "mapCustomEnabled" is true on config.lua, then load the custom map - if (g_configManager().getBoolean(TOGGLE_MAP_CUSTOM, __FUNCTION__)) { - g_game().loadCustomMaps(g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + "/world/custom/"); + if (g_configManager().getBoolean(TOGGLE_MAP_CUSTOM)) { + g_game().loadCustomMaps(g_configManager().getString(DATA_DIRECTORY) + "/world/custom/"); } Zone::refreshAll(); } catch (const std::exception &err) { @@ -176,7 +176,7 @@ void CanaryServer::loadMaps() const { void CanaryServer::setupHousesRent() { RentPeriod_t rentPeriod; - std::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD, __FUNCTION__)); + std::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD)); if (strRentPeriod == "yearly") { rentPeriod = RENTPERIOD_YEARLY; @@ -289,7 +289,7 @@ void CanaryServer::loadConfigLua() { modulesLoadHelper(g_configManager().load(), g_configManager().getConfigFileLua()); #ifdef _WIN32 - const std::string &defaultPriority = g_configManager().getString(DEFAULT_PRIORITY, __FUNCTION__); + const std::string &defaultPriority = g_configManager().getString(DEFAULT_PRIORITY); if (strcasecmp(defaultPriority.c_str(), "high") == 0) { SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); } else if (strcasecmp(defaultPriority.c_str(), "above-normal") == 0) { @@ -315,7 +315,7 @@ void CanaryServer::initializeDatabase() { DatabaseManager::updateDatabase(); - if (g_configManager().getBoolean(OPTIMIZE_DATABASE, __FUNCTION__) + if (g_configManager().getBoolean(OPTIMIZE_DATABASE) && !DatabaseManager::optimizeTables()) { logger.debug("No tables were optimized"); } @@ -323,8 +323,8 @@ void CanaryServer::initializeDatabase() { void CanaryServer::loadModules() { // If "USE_ANY_DATAPACK_FOLDER" is set to true then you can choose any datapack folder for your server - const auto useAnyDatapack = g_configManager().getBoolean(USE_ANY_DATAPACK_FOLDER, __FUNCTION__); - auto datapackName = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); + const auto useAnyDatapack = g_configManager().getBoolean(USE_ANY_DATAPACK_FOLDER); + auto datapackName = g_configManager().getString(DATA_DIRECTORY); if (!useAnyDatapack && datapackName != "data-canary" && datapackName != "data-otservbr-global") { throw FailedToInitializeCanary(fmt::format( "The datapack folder name '{}' is wrong, please select valid " @@ -339,7 +339,7 @@ void CanaryServer::loadModules() { g_luaEnvironment().initState(); } - auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + auto coreFolder = g_configManager().getString(CORE_DIRECTORY); // Load appearances.dat first modulesLoadHelper((g_game().loadAppearanceProtobuf(coreFolder + "/items/appearances.dat") == ERROR_NONE), "appearances.dat"); @@ -353,7 +353,7 @@ void CanaryServer::loadModules() { modulesLoadHelper(Item::items.loadFromXml(), "items.xml"); - const auto datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); + const auto datapackFolder = g_configManager().getString(DATA_DIRECTORY); logger.debug("Loading core scripts on folder: {}/", coreFolder); // Load first core Lua libs modulesLoadHelper((g_luaEnvironment().loadFile(coreFolder + "/core.lua", "core.lua") == 0), "core.lua"); diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 1d0138483a9..63779b89f9c 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -370,7 +370,7 @@ bool ConfigManager::load() { bool ConfigManager::reload() { const bool result = load(); - if (transformToSHA1(getString(SERVER_MOTD, __FUNCTION__)) != g_game().getMotdHash()) { + if (transformToSHA1(getString(SERVER_MOTD)) != g_game().getMotdHash()) { g_game().incrementMotdNum(); } return result; @@ -432,35 +432,35 @@ float ConfigManager::loadFloatConfig(lua_State* L, const ConfigKey_t &key, const return value; } -const std::string &ConfigManager::getString(const ConfigKey_t &key, std::string_view context) const { +const std::string &ConfigManager::getString(const ConfigKey_t &key, const std::source_location &location /*= std::source_location::current()*/) const { static const std::string dummyStr; if (configs.contains(key) && std::holds_alternative(configs.at(key))) { return std::get(configs.at(key)); } - g_logger().warn("[ConfigManager::getString] - Accessing invalid or wrong type index: {}[{}], Function: {}", magic_enum::enum_name(key), fmt::underlying(key), context); + g_logger().warn("[{}] accessing invalid or wrong type index: {}[{}]. Called line: {}:{}, in {}", __FUNCTION__, magic_enum::enum_name(key), fmt::underlying(key), location.line(), location.column(), location.function_name()); return dummyStr; } -int32_t ConfigManager::getNumber(const ConfigKey_t &key, std::string_view context) const { +int32_t ConfigManager::getNumber(const ConfigKey_t &key, const std::source_location &location /*= std::source_location::current()*/) const { if (configs.contains(key) && std::holds_alternative(configs.at(key))) { return std::get(configs.at(key)); } - g_logger().warn("[ConfigManager::getNumber] - Accessing invalid or wrong type index: {}[{}], Function: {}", magic_enum::enum_name(key), fmt::underlying(key), context); + g_logger().warn("[{}] accessing invalid or wrong type index: {}[{}]. Called line: {}:{}, in {}", __FUNCTION__, magic_enum::enum_name(key), fmt::underlying(key), location.line(), location.column(), location.function_name()); return 0; } -bool ConfigManager::getBoolean(const ConfigKey_t &key, std::string_view context) const { +bool ConfigManager::getBoolean(const ConfigKey_t &key, const std::source_location &location /*= std::source_location::current()*/) const { if (configs.contains(key) && std::holds_alternative(configs.at(key))) { return std::get(configs.at(key)); } - g_logger().warn("[ConfigManager::getBoolean] - Accessing invalid or wrong type index: {}[{}], Function: {}", magic_enum::enum_name(key), fmt::underlying(key), context); + g_logger().warn("[{}] accessing invalid or wrong type index: {}[{}]. Called line: {}:{}, in {}", __FUNCTION__, magic_enum::enum_name(key), fmt::underlying(key), location.line(), location.column(), location.function_name()); return false; } -float ConfigManager::getFloat(const ConfigKey_t &key, std::string_view context) const { +float ConfigManager::getFloat(const ConfigKey_t &key, const std::source_location &location /*= std::source_location::current()*/) const { if (configs.contains(key) && std::holds_alternative(configs.at(key))) { return std::get(configs.at(key)); } - g_logger().warn("[ConfigManager::getFloat] - Accessing invalid or wrong type index: {}[{}], Function: {}", magic_enum::enum_name(key), fmt::underlying(key), context); + g_logger().warn("[{}] accessing invalid or wrong type index: {}[{}]. Called line: {}:{}, in {}", __FUNCTION__, magic_enum::enum_name(key), fmt::underlying(key), location.line(), location.column(), location.function_name()); return 0.0f; } diff --git a/src/config/configmanager.hpp b/src/config/configmanager.hpp index 2a0c0861955..ddc15e45ed3 100644 --- a/src/config/configmanager.hpp +++ b/src/config/configmanager.hpp @@ -36,10 +36,10 @@ class ConfigManager { return configFileLua; }; - [[nodiscard]] const std::string &getString(const ConfigKey_t &key, std::string_view context) const; - [[nodiscard]] int32_t getNumber(const ConfigKey_t &key, std::string_view context) const; - [[nodiscard]] bool getBoolean(const ConfigKey_t &key, std::string_view context) const; - [[nodiscard]] float getFloat(const ConfigKey_t &key, std::string_view context) const; + [[nodiscard]] const std::string &getString(const ConfigKey_t &key, const std::source_location &location = std::source_location::current()) const; + [[nodiscard]] int32_t getNumber(const ConfigKey_t &key, const std::source_location &location = std::source_location::current()) const; + [[nodiscard]] bool getBoolean(const ConfigKey_t &key, const std::source_location &location = std::source_location::current()) const; + [[nodiscard]] float getFloat(const ConfigKey_t &key, const std::source_location &location = std::source_location::current()) const; private: phmap::flat_hash_map configs; diff --git a/src/creatures/appearance/mounts/mounts.cpp b/src/creatures/appearance/mounts/mounts.cpp index ada9fb1c4ff..e68610fc51e 100644 --- a/src/creatures/appearance/mounts/mounts.cpp +++ b/src/creatures/appearance/mounts/mounts.cpp @@ -19,7 +19,7 @@ bool Mounts::reload() { bool Mounts::loadFromXml() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/mounts.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/mounts.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); @@ -28,7 +28,7 @@ bool Mounts::loadFromXml() { for (auto mountNode : doc.child("mounts").children()) { auto lookType = pugi::cast(mountNode.attribute("clientid").value()); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && lookType != 0 && !g_game().isLookTypeRegistered(lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && lookType != 0 && !g_game().isLookTypeRegistered(lookType)) { g_logger().warn("{} - An unregistered creature mount with id '{}' was blocked to prevent client crash.", __FUNCTION__, lookType); continue; } diff --git a/src/creatures/appearance/outfit/outfit.cpp b/src/creatures/appearance/outfit/outfit.cpp index 40c28a1d7bb..7826ff71e37 100644 --- a/src/creatures/appearance/outfit/outfit.cpp +++ b/src/creatures/appearance/outfit/outfit.cpp @@ -25,7 +25,7 @@ bool Outfits::reload() { bool Outfits::loadFromXml() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/outfits.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/outfits.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); @@ -56,7 +56,7 @@ bool Outfits::loadFromXml() { } if (auto lookType = pugi::cast(lookTypeAttribute.value()); - g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && lookType != 0 + g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && lookType != 0 && !g_game().isLookTypeRegistered(lookType)) { g_logger().warn("[Outfits::loadFromXml] An unregistered creature looktype type with id '{}' was ignored to prevent client crash.", lookType); continue; diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index 4920e8cdc4e..9aefb280bbf 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -287,7 +287,7 @@ bool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr attacker, std::shared_ptr target) { - uint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__); + uint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL); if (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) { return true; } @@ -1006,17 +1006,17 @@ void Combat::setupChain(const std::shared_ptr &weapon) { setParam(COMBAT_PARAM_BLOCKARMOR, true); }; - setChainCallback(g_configManager().getNumber(COMBAT_CHAIN_TARGETS, __FUNCTION__), 1, true); + setChainCallback(g_configManager().getNumber(COMBAT_CHAIN_TARGETS), 1, true); switch (weaponType) { case WEAPON_SWORD: - setCommonValues(g_configManager().getFloat(COMBAT_CHAIN_SKILL_FORMULA_SWORD, __FUNCTION__), MELEE_ATK_SWORD, CONST_ME_SLASH); + setCommonValues(g_configManager().getFloat(COMBAT_CHAIN_SKILL_FORMULA_SWORD), MELEE_ATK_SWORD, CONST_ME_SLASH); break; case WEAPON_CLUB: - setCommonValues(g_configManager().getFloat(COMBAT_CHAIN_SKILL_FORMULA_CLUB, __FUNCTION__), MELEE_ATK_CLUB, CONST_ME_BLACK_BLOOD); + setCommonValues(g_configManager().getFloat(COMBAT_CHAIN_SKILL_FORMULA_CLUB), MELEE_ATK_CLUB, CONST_ME_BLACK_BLOOD); break; case WEAPON_AXE: - setCommonValues(g_configManager().getFloat(COMBAT_CHAIN_SKILL_FORMULA_AXE, __FUNCTION__), MELEE_ATK_AXE, CONST_ANI_WHIRLWINDAXE); + setCommonValues(g_configManager().getFloat(COMBAT_CHAIN_SKILL_FORMULA_AXE), MELEE_ATK_AXE, CONST_ANI_WHIRLWINDAXE); break; } @@ -1059,7 +1059,7 @@ bool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr(50, g_configManager().getNumber(COMBAT_CHAIN_DELAY, __FUNCTION__)); + auto delay = i * std::max(50, g_configManager().getNumber(COMBAT_CHAIN_DELAY)); ++i; for (auto to : toVector) { auto nextTarget = g_game().getCreatureByID(to); diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp index f07126ed868..ac28a63073c 100644 --- a/src/creatures/combat/condition.cpp +++ b/src/creatures/combat/condition.cpp @@ -1302,7 +1302,7 @@ uint32_t ConditionRegeneration::getHealthTicks(std::shared_ptr creatur std::shared_ptr player = creature->getPlayer(); if (player != nullptr && isBuff) { - return healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__); + return healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN); } return healthTicks; @@ -1312,7 +1312,7 @@ uint32_t ConditionRegeneration::getManaTicks(std::shared_ptr creature) std::shared_ptr player = creature->getPlayer(); if (player != nullptr && isBuff) { - return manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__); + return manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN); } return manaTicks; @@ -2326,7 +2326,7 @@ void ConditionOutfit::serialize(PropWriteStream &propWriteStream) { } bool ConditionOutfit::startCondition(std::shared_ptr creature) { - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { g_logger().warn("[ConditionOutfit::startCondition] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", outfit.lookType); return false; } @@ -2358,7 +2358,7 @@ void ConditionOutfit::endCondition(std::shared_ptr creature) { } void ConditionOutfit::addCondition(std::shared_ptr creature, const std::shared_ptr addCondition) { - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { g_logger().warn("[ConditionOutfit::addCondition] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", outfit.lookType); return; } diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index 263d7041887..b7ae69a8bd3 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -23,10 +23,10 @@ Spells::Spells() = default; Spells::~Spells() = default; TalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) { - auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__); + auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT); auto tile = player->getTile(); if (maxOnline > 1 && player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER && tile && !tile->hasFlag(TILESTATE_PROTECTIONZONE)) { - auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, __FUNCTION__); + auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT); auto accountPlayers = g_game().getPlayersByAccount(player->getAccount()); int countOutsizePZ = 0; for (const auto &accountPlayer : accountPlayers) { @@ -669,7 +669,7 @@ void Spell::applyCooldownConditions(std::shared_ptr player) const { WheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName()); bool isUpgraded = getWheelOfDestinyUpgraded() && static_cast(spellGrade) > 0; // Safety check to prevent division by zero - auto rateCooldown = g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__); + auto rateCooldown = g_configManager().getFloat(RATE_SPELL_COOLDOWN); if (std::abs(rateCooldown) < std::numeric_limits::epsilon()) { rateCooldown = 0.1; // Safe minimum value } @@ -1048,7 +1048,7 @@ bool RuneSpell::executeUse(std::shared_ptr player, std::shared_ptr } postCastSpell(player); - if (hasCharges && item && g_configManager().getBoolean(REMOVE_RUNE_CHARGES, __FUNCTION__)) { + if (hasCharges && item && g_configManager().getBoolean(REMOVE_RUNE_CHARGES)) { int32_t newCount = std::max(0, item->getItemCount() - 1); g_game().transformItem(item, item->getID(), newCount); player->updateSupplyTracker(item); diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index ac85e869605..c03f00a868a 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -488,7 +488,7 @@ void Creature::onCreatureMove(const std::shared_ptr &creature, const s stopEventWalk(); } - bool configTeleportSummons = g_configManager().getBoolean(TELEPORT_SUMMONS, __FUNCTION__); + bool configTeleportSummons = g_configManager().getBoolean(TELEPORT_SUMMONS); checkSummonMove(newPos, configTeleportSummons); if (isLostSummon()) { handleLostSummon(configTeleportSummons); @@ -649,7 +649,7 @@ void Creature::onDeath() { std::shared_ptr mostDamageCreature = nullptr; const int64_t timeNow = OTSYS_TIME(); - const uint32_t inFightTicks = g_configManager().getNumber(PZ_LOCKED, __FUNCTION__); + const uint32_t inFightTicks = g_configManager().getNumber(PZ_LOCKED); int32_t mostDamage = 0; std::map, uint64_t> experienceMap; std::unordered_set> killers; @@ -855,7 +855,7 @@ bool Creature::hasBeenAttacked(uint32_t attackerId) { if (it == damageMap.end()) { return false; } - return (OTSYS_TIME() - it->second.ticks) <= g_configManager().getNumber(PZ_LOCKED, __FUNCTION__); + return (OTSYS_TIME() - it->second.ticks) <= g_configManager().getNumber(PZ_LOCKED); } std::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) { @@ -954,7 +954,7 @@ BlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t // Apply skills 12.72 absorbs damage applyAbsorbDamageModifications(attacker, damage, combatType); - if (getMonster() && g_configManager().getBoolean(DISABLE_MONSTER_ARMOR, __FUNCTION__)) { + if (getMonster() && g_configManager().getBoolean(DISABLE_MONSTER_ARMOR)) { checkDefense = false; checkArmor = false; } diff --git a/src/creatures/interactions/chat.cpp b/src/creatures/interactions/chat.cpp index 84f4dd67e23..1d006ca95aa 100644 --- a/src/creatures/interactions/chat.cpp +++ b/src/creatures/interactions/chat.cpp @@ -268,7 +268,7 @@ Chat::Chat() : bool Chat::load() { pugi::xml_document doc; - auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + auto coreFolder = g_configManager().getString(CORE_DIRECTORY); auto folder = coreFolder + "/chatchannels/chatchannels.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 1db78747947..7dc2143aaeb 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -721,7 +721,7 @@ void Monster::onFollowCreatureComplete(const std::shared_ptr &creature float Monster::getMitigation() const { float mitigation = mType->info.mitigation * getDefenseMultiplier(); - if (g_configManager().getBoolean(DISABLE_MONSTER_ARMOR, __FUNCTION__)) { + if (g_configManager().getBoolean(DISABLE_MONSTER_ARMOR)) { mitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f; } return std::min(mitigation, 30.f); @@ -2132,8 +2132,8 @@ void Monster::dropLoot(std::shared_ptr corpse, std::shared_ptr(uniform_random(minSlivers, maxSlivers)); @@ -2142,7 +2142,7 @@ void Monster::dropLoot(std::shared_ptr corpse, std::shared_ptrinternalAddThing(sliver); } } - if (!this->isRewardBoss() && g_configManager().getNumber(RATE_LOOT, __FUNCTION__) > 0) { + if (!this->isRewardBoss() && g_configManager().getNumber(RATE_LOOT) > 0) { g_callbacks().executeCallback(EventCallback_t::monsterOnDropLoot, &EventCallback::monsterOnDropLoot, getMonster(), corpse); g_callbacks().executeCallback(EventCallback_t::monsterPostDropLoot, &EventCallback::monsterPostDropLoot, getMonster(), corpse); } diff --git a/src/creatures/monsters/monsters.hpp b/src/creatures/monsters/monsters.hpp index 88d25e195c6..a28903e0ad5 100644 --- a/src/creatures/monsters/monsters.hpp +++ b/src/creatures/monsters/monsters.hpp @@ -190,15 +190,15 @@ class MonsterType { } float getHealthMultiplier() const { - return isBoss() ? g_configManager().getFloat(RATE_BOSS_HEALTH, __FUNCTION__) : g_configManager().getFloat(RATE_MONSTER_HEALTH, __FUNCTION__); + return isBoss() ? g_configManager().getFloat(RATE_BOSS_HEALTH) : g_configManager().getFloat(RATE_MONSTER_HEALTH); } float getAttackMultiplier() const { - return isBoss() ? g_configManager().getFloat(RATE_BOSS_ATTACK, __FUNCTION__) : g_configManager().getFloat(RATE_MONSTER_ATTACK, __FUNCTION__); + return isBoss() ? g_configManager().getFloat(RATE_BOSS_ATTACK) : g_configManager().getFloat(RATE_MONSTER_ATTACK); } float getDefenseMultiplier() const { - return isBoss() ? g_configManager().getFloat(RATE_BOSS_DEFENSE, __FUNCTION__) : g_configManager().getFloat(RATE_MONSTER_DEFENSE, __FUNCTION__); + return isBoss() ? g_configManager().getFloat(RATE_BOSS_DEFENSE) : g_configManager().getFloat(RATE_MONSTER_DEFENSE); } bool isBoss() const { diff --git a/src/creatures/monsters/spawns/spawn_monster.cpp b/src/creatures/monsters/spawns/spawn_monster.cpp index 828549e7153..13321bd3914 100644 --- a/src/creatures/monsters/spawns/spawn_monster.cpp +++ b/src/creatures/monsters/spawns/spawn_monster.cpp @@ -91,7 +91,7 @@ bool SpawnsMonster::loadFromXML(const std::string &filemonstername) { weight = pugi::cast(weightAttribute.value()); } - uint32_t scheduleInterval = g_configManager().getNumber(DEFAULT_RESPAWN_TIME, __FUNCTION__); + uint32_t scheduleInterval = g_configManager().getNumber(DEFAULT_RESPAWN_TIME); try { scheduleInterval = pugi::cast(childMonsterNode.attribute("spawntime").value()); @@ -194,7 +194,7 @@ bool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const } void SpawnMonster::startup(bool delayed) { - if (g_configManager().getBoolean(RANDOM_MONSTER_SPAWN, __FUNCTION__)) { + if (g_configManager().getBoolean(RANDOM_MONSTER_SPAWN)) { for (auto it = spawnMonsterMap.begin(); it != spawnMonsterMap.end(); ++it) { auto &[spawnMonsterId, sb] = *it; for (auto &[monsterType, weight] : sb.monsterTypes) { @@ -315,7 +315,7 @@ bool SpawnMonster::addMonster(const std::string &name, const Position &pos, Dire boostedrate = 2; } // eventschedule is a whole percentage, so we need to multiply by 100 to match the order of magnitude of the other values - scheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule)); + scheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN) * boostedrate * eventschedule)); if (scheduleInterval < MONSTER_MINSPAWN_INTERVAL) { g_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); scheduleInterval = MONSTER_MINSPAWN_INTERVAL; diff --git a/src/creatures/npcs/npc.cpp b/src/creatures/npcs/npc.cpp index 4a767dee320..519afaf92f2 100644 --- a/src/creatures/npcs/npc.cpp +++ b/src/creatures/npcs/npc.cpp @@ -35,7 +35,7 @@ Npc::Npc(const std::shared_ptr &npcType) : npcType(npcType) { defaultOutfit = npcType->info.outfit; currentOutfit = npcType->info.outfit; - float multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__); + float multiplier = g_configManager().getFloat(RATE_NPC_HEALTH); health = npcType->info.health * multiplier; healthMax = npcType->info.healthMax * multiplier; baseSpeed = npcType->info.baseSpeed; @@ -415,7 +415,7 @@ void Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint if (totalRemoved > 0 && totalCost > 0) { if (getCurrency() == ITEM_GOLD_COIN) { totalPrice += totalCost; - if (g_configManager().getBoolean(AUTOBANK, __FUNCTION__)) { + if (g_configManager().getBoolean(AUTOBANK)) { player->setBankBalance(player->getBankBalance() + totalCost); } else { g_game().addMoney(player, totalCost); diff --git a/src/creatures/npcs/npcs.cpp b/src/creatures/npcs/npcs.cpp index 05fc48a63d8..7678daf38b0 100644 --- a/src/creatures/npcs/npcs.cpp +++ b/src/creatures/npcs/npcs.cpp @@ -103,11 +103,11 @@ void NpcType::loadShop(const std::shared_ptr &npcType, ShopBlock shopBl bool Npcs::load(bool loadLibs /* = true*/, bool loadNpcs /* = true*/, bool reloading /* = false*/) const { if (loadLibs) { - auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + auto coreFolder = g_configManager().getString(CORE_DIRECTORY); return g_luaEnvironment().loadFile(coreFolder + "/npclib/load.lua", "load.lua") == 0; } if (loadNpcs) { - auto datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); + auto datapackFolder = g_configManager().getString(DATA_DIRECTORY); return g_scripts().loadScripts(datapackFolder + "/npc", false, reloading); } return false; diff --git a/src/creatures/players/grouping/familiars.cpp b/src/creatures/players/grouping/familiars.cpp index 1e09fd5cd7f..49394714997 100644 --- a/src/creatures/players/grouping/familiars.cpp +++ b/src/creatures/players/grouping/familiars.cpp @@ -26,7 +26,7 @@ bool Familiars::reload() { bool Familiars::loadFromXml() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/familiars.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/familiars.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { g_logger().error("Failed to load Familiars"); diff --git a/src/creatures/players/grouping/groups.cpp b/src/creatures/players/grouping/groups.cpp index 189d2ecc165..d1a9568cb11 100644 --- a/src/creatures/players/grouping/groups.cpp +++ b/src/creatures/players/grouping/groups.cpp @@ -67,7 +67,7 @@ void parseGroupFlags(Group &group, const pugi::xml_node &groupNode) { bool Groups::load() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/groups.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/groups.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); diff --git a/src/creatures/players/grouping/party.cpp b/src/creatures/players/grouping/party.cpp index 067a1acd399..a409a8b3121 100644 --- a/src/creatures/players/grouping/party.cpp +++ b/src/creatures/players/grouping/party.cpp @@ -19,7 +19,7 @@ std::shared_ptr Party::create(std::shared_ptr leader) { auto party = std::make_shared(); party->m_leader = leader; leader->setParty(party); - if (g_configManager().getBoolean(PARTY_AUTO_SHARE_EXPERIENCE, __FUNCTION__)) { + if (g_configManager().getBoolean(PARTY_AUTO_SHARE_EXPERIENCE)) { party->setSharedExperience(leader, true); } return party; @@ -491,7 +491,7 @@ SharedExpStatus_t Party::getMemberSharedExperienceStatus(std::shared_ptr } float Party::shareRangeMultiplier() const { - return g_configManager().getFloat(PARTY_SHARE_RANGE_MULTIPLIER, __FUNCTION__); + return g_configManager().getFloat(PARTY_SHARE_RANGE_MULTIPLIER); } uint32_t Party::getHighestLevel() { @@ -618,7 +618,7 @@ void Party::updatePlayerStatus(std::shared_ptr player) { return; } - int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__); + int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE); for (const auto &member : getMembers()) { bool condition = (maxDistance == 0 || (Position::getDistanceX(player->getPosition(), member->getPosition()) <= maxDistance && Position::getDistanceY(player->getPosition(), member->getPosition()) <= maxDistance)); if (condition) { @@ -641,7 +641,7 @@ void Party::updatePlayerStatus(std::shared_ptr player, const Position &o return; } - int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__); + int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE); if (maxDistance != 0) { for (const auto &member : getMembers()) { bool condition1 = (Position::getDistanceX(oldPos, member->getPosition()) <= maxDistance && Position::getDistanceY(oldPos, member->getPosition()) <= maxDistance); @@ -669,7 +669,7 @@ void Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptrgetPosition(); auto leaderPosition = leader->getPosition(); for (const auto &member : getMembers()) { @@ -691,7 +691,7 @@ void Party::updatePlayerMana(std::shared_ptr player, uint8_t manaPercent return; } - int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__); + int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE); for (const auto &member : getMembers()) { bool condition = (maxDistance == 0 || (Position::getDistanceX(player->getPosition(), member->getPosition()) <= maxDistance && Position::getDistanceY(player->getPosition(), member->getPosition()) <= maxDistance)); if (condition) { @@ -710,7 +710,7 @@ void Party::updatePlayerVocation(std::shared_ptr player) { return; } - int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__); + int32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE); for (const auto &member : getMembers()) { bool condition = (maxDistance == 0 || (Position::getDistanceX(player->getPosition(), member->getPosition()) <= maxDistance && Position::getDistanceY(player->getPosition(), member->getPosition()) <= maxDistance)); if (condition) { diff --git a/src/creatures/players/imbuements/imbuements.cpp b/src/creatures/players/imbuements/imbuements.cpp index 069a77475e2..06db26b7210 100644 --- a/src/creatures/players/imbuements/imbuements.cpp +++ b/src/creatures/players/imbuements/imbuements.cpp @@ -26,7 +26,7 @@ Imbuement* Imbuements::getImbuement(uint16_t id) { bool Imbuements::loadFromXml(bool /* reloading */) { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/imbuements.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/imbuements.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); @@ -345,7 +345,7 @@ std::vector Imbuements::getImbuements(std::shared_ptr player } // Parse the storages for each imbuement in imbuements.xml and config.lua (enable/disable storage) - if (g_configManager().getBoolean(TOGGLE_IMBUEMENT_SHRINE_STORAGE, __FUNCTION__) + if (g_configManager().getBoolean(TOGGLE_IMBUEMENT_SHRINE_STORAGE) && imbuement->getStorage() != 0 && player->getStorageValue(imbuement->getStorage() == -1) && imbuement->getBaseID() >= 1 && imbuement->getBaseID() <= 3) { diff --git a/src/creatures/players/management/waitlist.cpp b/src/creatures/players/management/waitlist.cpp index f20843ea248..da658453161 100644 --- a/src/creatures/players/management/waitlist.cpp +++ b/src/creatures/players/management/waitlist.cpp @@ -64,7 +64,7 @@ bool WaitingList::clientLogin(std::shared_ptr player) { return true; } - auto maxPlayers = static_cast(g_configManager().getNumber(MAX_PLAYERS, __FUNCTION__)); + auto maxPlayers = static_cast(g_configManager().getNumber(MAX_PLAYERS)); if (maxPlayers == 0 || (info->priorityWaitList.empty() && info->waitList.empty() && g_game().getPlayersOnline() < maxPlayers)) { return true; } diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 6f5ed27d079..b8eb94346d7 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -229,7 +229,7 @@ std::shared_ptr Player::getInventoryItem(Slots_t slot) const { } bool Player::isSuppress(ConditionType_t conditionType, bool attackerPlayer) const { - auto minDelay = g_configManager().getNumber(MIN_DELAY_BETWEEN_CONDITIONS, __FUNCTION__); + auto minDelay = g_configManager().getNumber(MIN_DELAY_BETWEEN_CONDITIONS); if (IsConditionSuppressible(conditionType) && checkLastConditionTimeWithin(conditionType, minDelay)) { return true; } @@ -563,7 +563,7 @@ void Player::updateInventoryImbuement() { bool isInProtectionZone = playerTile && playerTile->hasFlag(TILESTATE_PROTECTIONZONE); // Check if the player is in fight mode bool isInFightMode = hasCondition(CONDITION_INFIGHT); - bool nonAggressiveFightOnly = g_configManager().getBoolean(TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, __FUNCTION__); + bool nonAggressiveFightOnly = g_configManager().getBoolean(TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY); // Iterate through all items in the player's inventory for (auto [key, item] : getAllSlotItems()) { @@ -978,7 +978,7 @@ bool Player::canWalkthrough(std::shared_ptr creature) { if (player) { std::shared_ptr playerTile = player->getTile(); - if (!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)) { + if (!playerTile || (!playerTile->hasFlag(TILESTATE_NOPVPZONE) && !playerTile->hasFlag(TILESTATE_PROTECTIONZONE) && player->getLevel() > static_cast(g_configManager().getNumber(PROTECTION_LEVEL)) && g_game().getWorldType() != WORLD_TYPE_NO_PVP)) { return false; } @@ -1026,7 +1026,7 @@ bool Player::canWalkthroughEx(std::shared_ptr creature) { std::shared_ptr npc = creature->getNpc(); if (player) { std::shared_ptr playerTile = player->getTile(); - return 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); + return playerTile && (playerTile->hasFlag(TILESTATE_NOPVPZONE) || playerTile->hasFlag(TILESTATE_PROTECTIONZONE) || player->getLevel() <= static_cast(g_configManager().getNumber(PROTECTION_LEVEL)) || g_game().getWorldType() == WORLD_TYPE_NO_PVP); } else if (npc) { std::shared_ptr tile = npc->getTile(); std::shared_ptr houseTile = std::dynamic_pointer_cast(tile); @@ -1254,7 +1254,7 @@ std::shared_ptr Player::getDepotLocker(uint32_t depotId) { auto it = depotLockerMap.find(depotId); if (it != depotLockerMap.end()) { inbox->setParent(it->second); - for (uint32_t i = g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__); i > 0; i--) { + for (uint32_t i = g_configManager().getNumber(DEPOT_BOXES); i > 0; i--) { if (std::shared_ptr depotBox = getDepotChest(i, false)) { depotBox->setParent(it->second->getItemByIndex(0)->getContainer()); } @@ -1272,8 +1272,8 @@ std::shared_ptr Player::getDepotLocker(uint32_t depotId) { if (createSupplyStash) { depotLocker->internalAddThing(Item::CreateItem(ITEM_SUPPLY_STASH)); } - std::shared_ptr depotChest = Item::CreateItemAsContainer(ITEM_DEPOT, static_cast(g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__))); - for (uint32_t i = g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__); i > 0; i--) { + std::shared_ptr depotChest = Item::CreateItemAsContainer(ITEM_DEPOT, static_cast(g_configManager().getNumber(DEPOT_BOXES))); + for (uint32_t i = g_configManager().getNumber(DEPOT_BOXES); i > 0; i--) { std::shared_ptr depotBox = getDepotChest(i, true); depotChest->internalAddThing(depotBox); depotBox->setParent(depotChest); @@ -1745,7 +1745,7 @@ void Player::onCreatureAppear(std::shared_ptr creature, bool isLogin) g_game().checkPlayersRecord(); IOLoginData::updateOnlineStatus(guid, true); - if (getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__) && getVocationId() > VOCATION_NONE) { + if (getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL) && getVocationId() > VOCATION_NONE) { for (uint8_t i = 2; i <= 6; i++) { if (!hasBlessing(i)) { addBlessing(i, 1); @@ -1785,13 +1785,13 @@ void Player::onChangeZone(ZoneType_t zone) { onAttackedCreatureDisappear(false); } - if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && !group->access && isMounted()) { + if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ) && !group->access && isMounted()) { dismount(); g_game().internalCreatureChangeOutfit(getPlayer(), defaultOutfit); wasMounted = true; } } else { - int32_t ticks = g_configManager().getNumber(STAIRHOP_DELAY, __FUNCTION__); + int32_t ticks = g_configManager().getNumber(STAIRHOP_DELAY); if (ticks > 0) { if (const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_PACIFIED, ticks, 0)) { addCondition(condition); @@ -1985,7 +1985,7 @@ void Player::onCreatureMove(const std::shared_ptr &creature, const std } if (teleport || oldPos.z != newPos.z) { - int32_t ticks = g_configManager().getNumber(STAIRHOP_DELAY, __FUNCTION__); + int32_t ticks = g_configManager().getNumber(STAIRHOP_DELAY); if (ticks > 0) { if (const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_PACIFIED, ticks, 0)) { addCondition(condition); @@ -2141,7 +2141,7 @@ void Player::setNextActionTask(std::shared_ptr task, bool resetIdleTime /* actionTaskEvent = 0; } - if (!inEventMovePush && !g_configManager().getBoolean(PUSH_WHEN_ATTACKING, __FUNCTION__)) { + if (!inEventMovePush && !g_configManager().getBoolean(PUSH_WHEN_ATTACKING)) { cancelPush(); } @@ -2210,10 +2210,10 @@ void Player::onThink(uint32_t interval) { // Momentum (cooldown resets) triggerMomentum(); auto playerTile = getTile(); - const bool vipStaysOnline = isVip() && g_configManager().getBoolean(VIP_STAY_ONLINE, __FUNCTION__); + const bool vipStaysOnline = isVip() && g_configManager().getBoolean(VIP_STAY_ONLINE); idleTime += interval; if (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) { - const int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__); + const int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES); if (idleTime > (kickAfterMinutes * 60000) + 60000) { removePlayer(true); } else if (client && idleTime == 60000 * kickAfterMinutes) { @@ -2253,7 +2253,7 @@ uint32_t Player::isMuted() const { } void Player::addMessageBuffer() { - if (MessageBufferCount > 0 && g_configManager().getNumber(MAX_MESSAGEBUFFER, __FUNCTION__) != 0 && !hasFlag(PlayerFlags_t::CannotBeMuted)) { + if (MessageBufferCount > 0 && g_configManager().getNumber(MAX_MESSAGEBUFFER) != 0 && !hasFlag(PlayerFlags_t::CannotBeMuted)) { --MessageBufferCount; } } @@ -2263,7 +2263,7 @@ void Player::removeMessageBuffer() { return; } - const int32_t maxMessageBuffer = g_configManager().getNumber(MAX_MESSAGEBUFFER, __FUNCTION__); + const int32_t maxMessageBuffer = g_configManager().getNumber(MAX_MESSAGEBUFFER); if (maxMessageBuffer != 0 && MessageBufferCount <= maxMessageBuffer + 1) { if (++MessageBufferCount > maxMessageBuffer) { uint32_t muteCount = 1; @@ -2390,7 +2390,7 @@ void Player::addExperience(std::shared_ptr target, uint64_t exp, bool std::shared_ptr monster = target && target->getMonster() ? target->getMonster() : nullptr; bool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0; if (handleHazardExperience) { - exp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.; + exp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER))) / 100.; } experience += exp; @@ -2398,7 +2398,7 @@ void Player::addExperience(std::shared_ptr target, uint64_t exp, bool if (sendText) { std::string expString = fmt::format("{} experience point{}.", exp, (exp != 1 ? "s" : "")); if (isVip()) { - uint8_t expPercent = g_configManager().getNumber(VIP_BONUS_EXP, __FUNCTION__); + uint8_t expPercent = g_configManager().getNumber(VIP_BONUS_EXP); if (expPercent > 0) { expString = expString + fmt::format(" (VIP bonus {}%)", expPercent > 100 ? 100 : expPercent); } @@ -2703,7 +2703,7 @@ BlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t co } void Player::death(std::shared_ptr lastHitCreature) { - if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && isMounted()) { + if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ) && isMounted()) { dismount(); g_game().internalCreatureChangeOutfit(getPlayer(), defaultOutfit); } @@ -2855,7 +2855,7 @@ void Player::death(std::shared_ptr lastHitCreature) { } sendTextMessage(MESSAGE_EVENT_ADVANCE, deathType.str()); - auto adventurerBlessingLevel = g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__); + auto adventurerBlessingLevel = g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL); auto willNotLoseBless = getLevel() < adventurerBlessingLevel && getVocationId() > VOCATION_NONE; std::string bless = getBlessingsName(); @@ -3046,7 +3046,7 @@ void Player::addInFightTicks(bool pzlock /*= false*/) { updateImbuementTrackerStats(); - std::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(PZ_LOCKED, __FUNCTION__), 0); + std::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(PZ_LOCKED), 0); addCondition(condition); } @@ -3142,7 +3142,7 @@ ReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, const int32_t &slotPosition = item->getSlotPosition(); - bool allowPutItemsOnAmmoSlot = g_configManager().getBoolean(ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, __FUNCTION__); + bool allowPutItemsOnAmmoSlot = g_configManager().getBoolean(ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT); if (allowPutItemsOnAmmoSlot && index == CONST_SLOT_AMMO) { ret = RETURNVALUE_NOERROR; } else { @@ -3723,7 +3723,7 @@ void Player::stashContainer(StashContainerList itemDict) { } } - if (getStashSize(stashItemDict) > g_configManager().getNumber(STASH_ITEMS, __FUNCTION__)) { + if (getStashSize(stashItemDict) > g_configManager().getNumber(STASH_ITEMS)) { sendCancelMessage("You don't have capacity in the Supply Stash to stow all this item->"); return; } @@ -4402,7 +4402,7 @@ void Player::doAttacking(uint32_t) { std::shared_ptr tool = getWeapon(); const WeaponShared_ptr weapon = g_weapons().getWeapon(tool); uint32_t delay = getAttackSpeed(); - bool classicSpeed = g_configManager().getBoolean(CLASSIC_ATTACK_SPEED, __FUNCTION__); + bool classicSpeed = g_configManager().getBoolean(CLASSIC_ATTACK_SPEED); if (weapon) { if (!weapon->interruptSwing()) { @@ -4438,9 +4438,9 @@ void Player::doAttacking(uint32_t) { } uint64_t Player::getGainedExperience(std::shared_ptr attacker) const { - if (g_configManager().getBoolean(EXPERIENCE_FROM_PLAYERS, __FUNCTION__)) { + if (g_configManager().getBoolean(EXPERIENCE_FROM_PLAYERS)) { auto attackerPlayer = attacker->getPlayer(); - if (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE, __FUNCTION__)) { + if (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE)) { return std::max(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.75)); } } @@ -4775,7 +4775,7 @@ bool Player::onKilledPlayer(const std::shared_ptr &target, bool lastHit) if (lastHit && hasCondition(CONDITION_INFIGHT)) { pzLocked = true; - std::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(WHITE_SKULL_TIME, __FUNCTION__), 0); + std::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(WHITE_SKULL_TIME), 0); addCondition(condition); } } @@ -4804,7 +4804,7 @@ void Player::addBestiaryKill(const std::shared_ptr &mType) { if (mType->isBoss()) { return; } - uint32_t kills = g_configManager().getNumber(BESTIARY_KILL_MULTIPLIER, __FUNCTION__); + uint32_t kills = g_configManager().getNumber(BESTIARY_KILL_MULTIPLIER); if (isConcoctionActive(Concoction_t::BestiaryBetterment)) { kills *= 2; } @@ -4815,9 +4815,9 @@ void Player::addBosstiaryKill(const std::shared_ptr &mType) { if (!mType->isBoss()) { return; } - uint32_t kills = g_configManager().getNumber(BOSSTIARY_KILL_MULTIPLIER, __FUNCTION__); + uint32_t kills = g_configManager().getNumber(BOSSTIARY_KILL_MULTIPLIER); if (g_ioBosstiary().getBoostedBossId() == mType->info.raceid) { - kills *= g_configManager().getNumber(BOOSTED_BOSS_KILL_BONUS, __FUNCTION__); + kills *= g_configManager().getNumber(BOOSTED_BOSS_KILL_BONUS); } g_ioBosstiary().addBosstiaryKill(getPlayer(), mType, kills); } @@ -4910,7 +4910,7 @@ void Player::changeMana(int32_t manaChange) { void Player::changeSoul(int32_t soulChange) { if (soulChange > 0) { - soul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul); + soul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN), vocation->getSoulMax() - soul); } else { soul = std::max(0, soul + soulChange); } @@ -4919,7 +4919,7 @@ void Player::changeSoul(int32_t soulChange) { } bool Player::canWear(uint16_t lookType, uint8_t addons) const { - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && lookType != 0 && !g_game().isLookTypeRegistered(lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && lookType != 0 && !g_game().isLookTypeRegistered(lookType)) { g_logger().warn("[Player::canWear] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", lookType); return false; } @@ -5136,7 +5136,7 @@ Skulls_t Player::getSkullClient(std::shared_ptr creature) { if (player && player->getSkull() == SKULL_NONE) { if (player.get() == this) { for (const auto &kill : unjustifiedKills) { - if (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60) { + if (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION) * 24 * 60 * 60) { return SKULL_ORANGE; } } @@ -5159,7 +5159,7 @@ Skulls_t Player::getSkullClient(std::shared_ptr creature) { bool Player::hasKilled(std::shared_ptr player) const { for (const auto &kill : unjustifiedKills) { - if (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) { + if (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION) * 24 * 60 * 60 && kill.unavenged) { return true; } } @@ -5222,14 +5222,14 @@ void Player::addUnjustifiedDead(std::shared_ptr attacked) { } if (getSkull() != SKULL_BLACK) { - if (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__)) { + if (dayKills >= 2 * g_configManager().getNumber(DAY_KILLS_TO_RED) || weekKills >= 2 * g_configManager().getNumber(WEEK_KILLS_TO_RED) || monthKills >= 2 * g_configManager().getNumber(MONTH_KILLS_TO_RED)) { setSkull(SKULL_BLACK); // start black skull time - skullTicks = static_cast(g_configManager().getNumber(BLACK_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60; - } 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__)) { + skullTicks = static_cast(g_configManager().getNumber(BLACK_SKULL_DURATION)) * 24 * 60 * 60; + } else if (dayKills >= g_configManager().getNumber(DAY_KILLS_TO_RED) || weekKills >= g_configManager().getNumber(WEEK_KILLS_TO_RED) || monthKills >= g_configManager().getNumber(MONTH_KILLS_TO_RED)) { setSkull(SKULL_RED); // reset red skull time - skullTicks = static_cast(g_configManager().getNumber(RED_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60; + skullTicks = static_cast(g_configManager().getNumber(RED_SKULL_DURATION)) * 24 * 60 * 60; } } @@ -5263,7 +5263,7 @@ double Player::getLostPercent() const { } } - int32_t deathLosePercent = g_configManager().getNumber(DEATH_LOSE_PERCENT, __FUNCTION__); + int32_t deathLosePercent = g_configManager().getNumber(DEATH_LOSE_PERCENT); if (deathLosePercent != -1) { if (isPromoted()) { deathLosePercent -= 3; @@ -5435,7 +5435,7 @@ bool Player::isPlayerGroup() const { } bool Player::isPremium() const { - if (g_configManager().getBoolean(FREE_PREMIUM, __FUNCTION__) || hasFlag(PlayerFlags_t::IsAlwaysPremium)) { + if (g_configManager().getBoolean(FREE_PREMIUM) || hasFlag(PlayerFlags_t::IsAlwaysPremium)) { return true; } @@ -5764,9 +5764,9 @@ void Player::sendUnjustifiedPoints() { bool isRed = getSkull() == SKULL_RED; - auto dayMax = ((isRed ? 2 : 1) * g_configManager().getNumber(DAY_KILLS_TO_RED, __FUNCTION__)); - auto weekMax = ((isRed ? 2 : 1) * g_configManager().getNumber(WEEK_KILLS_TO_RED, __FUNCTION__)); - auto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__)); + auto dayMax = ((isRed ? 2 : 1) * g_configManager().getNumber(DAY_KILLS_TO_RED)); + auto weekMax = ((isRed ? 2 : 1) * g_configManager().getNumber(WEEK_KILLS_TO_RED)); + auto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED)); uint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0); uint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0); @@ -5839,7 +5839,7 @@ bool Player::toggleMount(bool mount) { } auto tile = getTile(); - if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && !group->access && tile && tile->hasFlag(TILESTATE_PROTECTIONZONE)) { + if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ) && !group->access && tile && tile->hasFlag(TILESTATE_PROTECTIONZONE)) { sendCancelMessage(RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE); return false; } @@ -6303,9 +6303,9 @@ size_t Player::getMaxDepotItems() const { if (group->maxDepotItems != 0) { return group->maxDepotItems; } else if (isPremium()) { - return g_configManager().getNumber(PREMIUM_DEPOT_LIMIT, __FUNCTION__); + return g_configManager().getNumber(PREMIUM_DEPOT_LIMIT); } - return g_configManager().getNumber(FREE_DEPOT_LIMIT, __FUNCTION__); + return g_configManager().getNumber(FREE_DEPOT_LIMIT); } std::vector> Player::getMuteConditions() const { @@ -6563,9 +6563,9 @@ void Player::stowItem(std::shared_ptr item, uint32_t count, bool allItems) } else if (item->getContainer()) { itemDict = item->getContainer()->getStowableItems(); for (const std::shared_ptr &containerItem : item->getContainer()->getItems(true)) { - uint32_t depotChest = g_configManager().getNumber(DEPOTCHEST, __FUNCTION__); + uint32_t depotChest = g_configManager().getNumber(DEPOTCHEST); bool validDepot = depotChest > 0 && depotChest < 21; - if (g_configManager().getBoolean(STASH_MOVING, __FUNCTION__) && containerItem && !containerItem->isStackable() && validDepot) { + if (g_configManager().getBoolean(STASH_MOVING) && containerItem && !containerItem->isStackable() && validDepot) { g_game().internalMoveItem(containerItem->getParent(), getDepotChest(depotChest, true), INDEX_WHEREEVER, containerItem, containerItem->getItemCount(), nullptr); movedItems++; moved = true; @@ -6624,9 +6624,9 @@ void Player::initializePrey() { if (preys.empty()) { for (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) { auto slot = std::make_unique(static_cast(slotId)); - if (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(PREY_ENABLED)) { slot->state = PreyDataState_Inactive; - } else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(PREY_FREE_THIRD_SLOT, __FUNCTION__)) { + } else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(PREY_FREE_THIRD_SLOT)) { slot->state = PreyDataState_Locked; } else if (slot->id == PreySlot_Two && !isPremium()) { slot->state = PreyDataState_Locked; @@ -6652,9 +6652,9 @@ void Player::initializeTaskHunting() { if (taskHunting.empty()) { for (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) { auto slot = std::make_unique(static_cast(slotId)); - if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { slot->state = PreyTaskDataState_Inactive; - } else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(TASK_HUNTING_FREE_THIRD_SLOT, __FUNCTION__)) { + } else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(TASK_HUNTING_FREE_THIRD_SLOT)) { slot->state = PreyTaskDataState_Locked; } else if (slot->id == PreySlot_Two && !isPremium()) { slot->state = PreyTaskDataState_Locked; @@ -6667,7 +6667,7 @@ void Player::initializeTaskHunting() { } } - if (client && g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__) && !client->oldProtocol) { + if (client && g_configManager().getBoolean(TASK_HUNTING_ENABLED) && !client->oldProtocol) { client->writeToOutputBuffer(g_ioprey().getTaskHuntingBaseDate()); } } @@ -6766,7 +6766,7 @@ void Player::triggerTranscendance() { double_t chance = item->getTranscendenceChance(); double_t randomChance = uniform_random(0, 10000) / 100.; if (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) { - int64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__); + int64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION); auto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast(); Outfit_t outfit; outfit.lookType = getVocation()->getAvatarLookType(); @@ -7109,7 +7109,7 @@ bool Player::saySpell( // Send to client for (const std::shared_ptr &spectator : spectators) { if (std::shared_ptr tmpPlayer = spectator->getPlayer()) { - if (g_configManager().getBoolean(EMOTE_SPELLS, __FUNCTION__)) { + if (g_configManager().getBoolean(EMOTE_SPELLS)) { valueEmote = tmpPlayer->getStorageValue(STORAGEVALUE_EMOTE); } if (!ghostMode || tmpPlayer->canSeeCreature(static_self_cast())) { @@ -7206,7 +7206,7 @@ void Player::forgeFuseItems(ForgeAction_t actionType, uint16_t firstItemId, uint } auto configKey = convergence ? FORGE_CONVERGENCE_FUSION_DUST_COST : FORGE_FUSION_DUST_COST; - auto dustCost = static_cast(g_configManager().getNumber(configKey, __FUNCTION__)); + auto dustCost = static_cast(g_configManager().getNumber(configKey)); if (convergence) { firstForgedItem->setTier(tier + 1); history.dustCost = dustCost; @@ -7309,7 +7309,7 @@ void Player::forgeFuseItems(ForgeAction_t actionType, uint16_t firstItemId, uint } } } else { - auto isTierLost = uniform_random(1, 100) <= (reduceTierLoss ? g_configManager().getNumber(FORGE_TIER_LOSS_REDUCTION, __FUNCTION__) : 100); + auto isTierLost = uniform_random(1, 100) <= (reduceTierLoss ? g_configManager().getNumber(FORGE_TIER_LOSS_REDUCTION) : 100); if (isTierLost) { if (secondForgedItem->getTier() >= 1) { secondForgedItem->setTier(tier - 1); @@ -7442,12 +7442,12 @@ void Player::forgeTransferItemTier(ForgeAction_t actionType, uint16_t donorItemI } auto configKey = convergence ? FORGE_CONVERGENCE_TRANSFER_DUST_COST : FORGE_TRANSFER_DUST_COST; - if (getForgeDusts() < g_configManager().getNumber(configKey, __FUNCTION__)) { + if (getForgeDusts() < g_configManager().getNumber(configKey)) { g_logger().error("[Log 8] Failed to remove transfer dusts from player with name {}", getName()); sendForgeError(RETURNVALUE_CONTACTADMINISTRATOR); return; } else { - setForgeDusts(getForgeDusts() - g_configManager().getNumber(configKey, __FUNCTION__)); + setForgeDusts(getForgeDusts() - g_configManager().getNumber(configKey)); } if (convergence) { @@ -7519,14 +7519,14 @@ void Player::forgeResourceConversion(ForgeAction_t actionType) { ReturnValue returnValue = RETURNVALUE_NOERROR; if (actionType == ForgeAction_t::DUSTTOSLIVERS) { auto dusts = getForgeDusts(); - auto cost = static_cast(g_configManager().getNumber(FORGE_COST_ONE_SLIVER, __FUNCTION__) * g_configManager().getNumber(FORGE_SLIVER_AMOUNT, __FUNCTION__)); + auto cost = static_cast(g_configManager().getNumber(FORGE_COST_ONE_SLIVER) * g_configManager().getNumber(FORGE_SLIVER_AMOUNT)); if (cost > dusts) { g_logger().error("[{}] Not enough dust", __FUNCTION__); sendForgeError(RETURNVALUE_CONTACTADMINISTRATOR); return; } - auto itemCount = static_cast(g_configManager().getNumber(FORGE_SLIVER_AMOUNT, __FUNCTION__)); + auto itemCount = static_cast(g_configManager().getNumber(FORGE_SLIVER_AMOUNT)); std::shared_ptr item = Item::CreateItem(ITEM_FORGE_SLIVER, itemCount); returnValue = g_game().internalPlayerAddItem(static_self_cast(), item); if (returnValue != RETURNVALUE_NOERROR) { @@ -7540,7 +7540,7 @@ void Player::forgeResourceConversion(ForgeAction_t actionType) { setForgeDusts(dusts - cost); } else if (actionType == ForgeAction_t::SLIVERSTOCORES) { auto [sliverCount, coreCount] = getForgeSliversAndCores(); - auto cost = static_cast(g_configManager().getNumber(FORGE_CORE_COST, __FUNCTION__)); + auto cost = static_cast(g_configManager().getNumber(FORGE_CORE_COST)); if (cost > sliverCount) { g_logger().error("[{}] Not enough sliver", __FUNCTION__); sendForgeError(RETURNVALUE_CONTACTADMINISTRATOR); @@ -7568,7 +7568,7 @@ void Player::forgeResourceConversion(ForgeAction_t actionType) { history.gained = 1; } else { auto dustLevel = getForgeDustLevel(); - if (dustLevel >= g_configManager().getNumber(FORGE_MAX_DUST, __FUNCTION__)) { + if (dustLevel >= g_configManager().getNumber(FORGE_MAX_DUST)) { g_logger().error("[{}] Maximum level reached", __FUNCTION__); sendForgeError(RETURNVALUE_CONTACTADMINISTRATOR); return; @@ -7903,7 +7903,7 @@ std::shared_ptr Player::getAccount() const { ******************************************************************************/ void Player::setHazardSystemPoints(int32_t count) { - if (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM, __FUNCTION__)) { + if (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM)) { return; } addStorageValue(STORAGEVALUE_HAZARDCOUNT, std::max(0, std::min(0xFFFF, count)), true); @@ -7920,7 +7920,7 @@ void Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptr(normal_random(1, 10000)); - auto critChance = g_configManager().getNumber(HAZARD_CRITICAL_CHANCE, __FUNCTION__); + auto critChance = g_configManager().getNumber(HAZARD_CRITICAL_CHANCE); // Critical chance - if (monster->getHazardSystemCrit() && (lastHazardSystemCriticalHit + g_configManager().getNumber(HAZARD_CRITICAL_INTERVAL, __FUNCTION__)) <= OTSYS_TIME() && chance <= critChance && !damage.critical) { + if (monster->getHazardSystemCrit() && (lastHazardSystemCriticalHit + g_configManager().getNumber(HAZARD_CRITICAL_INTERVAL)) <= OTSYS_TIME() && chance <= critChance && !damage.critical) { damage.critical = true; damage.extension = true; damage.exString = "(Hazard)"; - stage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__)); + stage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER)); damage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000)); damage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000)); lastHazardSystemCriticalHit = OTSYS_TIME(); @@ -7962,7 +7962,7 @@ void Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptrgetHazardSystemDamageBoost() /* && !damage.critical*/) { - stage = points * static_cast(g_configManager().getNumber(HAZARD_DAMAGE_MULTIPLIER, __FUNCTION__)); + stage = points * static_cast(g_configManager().getNumber(HAZARD_DAMAGE_MULTIPLIER)); if (stage != 0) { damage.extension = true; damage.exString = "(Hazard)"; @@ -7975,7 +7975,7 @@ void Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptr monster) { - if (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM, __FUNCTION__)) { + if (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM)) { return; } @@ -8007,7 +8007,7 @@ void Player::parseAttackDealtHazardSystem(CombatDamage &damage, std::shared_ptr< // Dodge chance uint16_t stage; if (monster->getHazardSystemDodge()) { - stage = points * g_configManager().getNumber(HAZARD_DODGE_MULTIPLIER, __FUNCTION__); + stage = points * g_configManager().getNumber(HAZARD_DODGE_MULTIPLIER); auto chance = static_cast(normal_random(1, 10000)); if (chance <= stage) { damage.primary.value = 0; @@ -8016,7 +8016,7 @@ void Player::parseAttackDealtHazardSystem(CombatDamage &damage, std::shared_ptr< } } if (monster->getHazardSystemDefenseBoost()) { - stage = points * static_cast(g_configManager().getNumber(HAZARD_DEFENSE_MULTIPLIER, __FUNCTION__)); + stage = points * static_cast(g_configManager().getNumber(HAZARD_DEFENSE_MULTIPLIER)); if (stage != 0) { damage.exString = fmt::format("(hazard -{}%)", stage / 100.); damage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000)); @@ -8170,7 +8170,7 @@ uint16_t Player::getDodgeChance() const { } void Player::checkAndShowBlessingMessage() { - auto adventurerBlessingLevel = g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__); + auto adventurerBlessingLevel = g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL); auto willNotLoseBless = getLevel() < adventurerBlessingLevel && getVocationId() > VOCATION_NONE; std::string bless = getBlessingsName(); std::ostringstream blessOutput; diff --git a/src/creatures/players/player.hpp b/src/creatures/players/player.hpp index 124ad59ed6b..ff844c97b3b 100644 --- a/src/creatures/players/player.hpp +++ b/src/creatures/players/player.hpp @@ -627,7 +627,7 @@ class Player final : public Creature, public Cylinder, public Bankable { time_t getPremiumLastDay() const; bool isVip() const { - return g_configManager().getBoolean(VIP_SYSTEM_ENABLED, __FUNCTION__) && (getPremiumDays() > 0 || getPremiumLastDay() > getTimeNow()); + return g_configManager().getBoolean(VIP_SYSTEM_ENABLED) && (getPremiumDays() > 0 || getPremiumLastDay() > getTimeNow()); } void setTibiaCoins(int32_t v); @@ -2147,13 +2147,13 @@ class Player final : public Creature, public Cylinder, public Bankable { } void sendPreyTimeLeft(const std::unique_ptr &slot) const { - if (g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__) && client) { + if (g_configManager().getBoolean(PREY_ENABLED) && client) { client->sendPreyTimeLeft(slot); } } void reloadPreySlot(PreySlot_t slotid) { - if (g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__) && client) { + if (g_configManager().getBoolean(PREY_ENABLED) && client) { client->sendPreyData(getPreySlotById(slotid)); client->sendResourcesBalance(getMoney(), getBankBalance(), getPreyCards(), getTaskHuntingPoints()); } @@ -2203,7 +2203,7 @@ class Player final : public Creature, public Cylinder, public Bankable { } uint32_t getPreyRerollPrice() const { - return getLevel() * g_configManager().getNumber(PREY_REROLL_PRICE_LEVEL, __FUNCTION__); + return getLevel() * g_configManager().getNumber(PREY_REROLL_PRICE_LEVEL); } std::vector getPreyBlackList() const { @@ -2223,7 +2223,7 @@ class Player final : public Creature, public Cylinder, public Bankable { } const std::unique_ptr &getPreyWithMonster(uint16_t raceId) const { - if (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(PREY_ENABLED)) { return PreySlotNull; } @@ -2251,7 +2251,7 @@ class Player final : public Creature, public Cylinder, public Bankable { } void reloadTaskSlot(PreySlot_t slotid) { - if (g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__) && client) { + if (g_configManager().getBoolean(TASK_HUNTING_ENABLED) && client) { client->sendTaskHuntingData(getTaskHuntingSlotById(slotid)); client->sendResourcesBalance(getMoney(), getBankBalance(), getPreyCards(), getTaskHuntingPoints()); } @@ -2319,11 +2319,11 @@ class Player final : public Creature, public Cylinder, public Bankable { } uint32_t getTaskHuntingRerollPrice() const { - return getLevel() * g_configManager().getNumber(TASK_HUNTING_REROLL_PRICE_LEVEL, __FUNCTION__); + return getLevel() * g_configManager().getNumber(TASK_HUNTING_REROLL_PRICE_LEVEL); } const std::unique_ptr &getTaskHuntingWithCreature(uint16_t raceId) const { - if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { return TaskHuntingSlotNull; } @@ -2571,10 +2571,10 @@ class Player final : public Creature, public Cylinder, public Bankable { } bool checkAutoLoot(bool isBoss) const { - if (!g_configManager().getBoolean(AUTOLOOT, __FUNCTION__)) { + if (!g_configManager().getBoolean(AUTOLOOT)) { return false; } - if (g_configManager().getBoolean(VIP_SYSTEM_ENABLED, __FUNCTION__) && g_configManager().getBoolean(VIP_AUTOLOOT_VIP_ONLY, __FUNCTION__) && !isVip()) { + if (g_configManager().getBoolean(VIP_SYSTEM_ENABLED) && g_configManager().getBoolean(VIP_AUTOLOOT_VIP_ONLY) && !isVip()) { return false; } @@ -2742,7 +2742,7 @@ class Player final : public Creature, public Cylinder, public Bankable { std::map maxValuePerSkill = { { SKILL_LIFE_LEECH_CHANCE, 100 }, { SKILL_MANA_LEECH_CHANCE, 100 }, - { SKILL_CRITICAL_HIT_CHANCE, 100 * g_configManager().getNumber(CRITICALCHANCE, "std::map::maxValuePerSkill") } + { SKILL_CRITICAL_HIT_CHANCE, 100 * g_configManager().getNumber(CRITICALCHANCE) } }; std::map> rewardMap; @@ -2982,14 +2982,13 @@ class Player final : public Creature, public Cylinder, public Bankable { bool isPromoted() const; - bool onFistAttackSpeed = g_configManager().getBoolean(TOGGLE_ATTACK_SPEED_ONFIST, "Player.hpp::onFistAttackSpeed"); - uint32_t MAX_ATTACK_SPEED = g_configManager().getNumber(MAX_SPEED_ATTACKONFIST, "Player.hpp::MAX_ATTACK_SPEED"); - uint32_t getAttackSpeed() const { + bool onFistAttackSpeed = g_configManager().getBoolean(TOGGLE_ATTACK_SPEED_ONFIST); + uint32_t MAX_ATTACK_SPEED = g_configManager().getNumber(MAX_SPEED_ATTACKONFIST); if (onFistAttackSpeed) { uint32_t baseAttackSpeed = vocation->getAttackSpeed(); uint32_t skillLevel = getSkillLevel(SKILL_FIST); - uint32_t attackSpeed = baseAttackSpeed - (skillLevel * g_configManager().getNumber(MULTIPLIER_ATTACKONFIST, __FUNCTION__)); + uint32_t attackSpeed = baseAttackSpeed - (skillLevel * g_configManager().getNumber(MULTIPLIER_ATTACKONFIST)); if (attackSpeed < MAX_ATTACK_SPEED) { attackSpeed = MAX_ATTACK_SPEED; diff --git a/src/creatures/players/storages/storages.cpp b/src/creatures/players/storages/storages.cpp index 8f53bff0cec..6f6847858ed 100644 --- a/src/creatures/players/storages/storages.cpp +++ b/src/creatures/players/storages/storages.cpp @@ -13,7 +13,7 @@ bool Storages::loadFromXML() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/storages.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/storages.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { diff --git a/src/creatures/players/vocations/vocation.cpp b/src/creatures/players/vocations/vocation.cpp index 3da025f7b4a..5e497f18d44 100644 --- a/src/creatures/players/vocations/vocation.cpp +++ b/src/creatures/players/vocations/vocation.cpp @@ -19,7 +19,7 @@ bool Vocations::reload() { bool Vocations::loadFromXml() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/vocations.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/vocations.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); diff --git a/src/creatures/players/vocations/vocation.hpp b/src/creatures/players/vocations/vocation.hpp index 0ad95ac0fc0..f4f35082cfc 100644 --- a/src/creatures/players/vocations/vocation.hpp +++ b/src/creatures/players/vocations/vocation.hpp @@ -57,19 +57,19 @@ class Vocation { } uint32_t getManaGainTicks() const { - return gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__); + return gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED); } uint32_t getManaGainAmount() const { - return gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__); + return gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN); } uint32_t getHealthGainTicks() const { - return gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__); + return gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED); } uint32_t getHealthGainAmount() const { - return gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__); + return gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN); } uint8_t getSoulMax() const { @@ -77,7 +77,7 @@ class Vocation { } uint32_t getSoulGainTicks() const { - return gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED, __FUNCTION__); + return gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED); } uint32_t getBaseAttackSpeed() const { @@ -85,7 +85,7 @@ class Vocation { } uint32_t getAttackSpeed() const { - return attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED, __FUNCTION__); + return attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED); } uint32_t getBaseSpeed() const { diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index 6500420adfc..11ab7495ead 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -144,7 +144,7 @@ namespace { PlayerWheel::PlayerWheel(Player &initPlayer) : m_player(initPlayer) { - auto pointsPerLevel = (uint16_t)g_configManager().getNumber(WHEEL_POINTS_PER_LEVEL, __FUNCTION__); + auto pointsPerLevel = (uint16_t)g_configManager().getNumber(WHEEL_POINTS_PER_LEVEL); m_pointsPerLevel = pointsPerLevel > 0 ? pointsPerLevel : 1; } @@ -828,7 +828,7 @@ uint64_t PlayerWheel::getGemRotateCost(WheelGemQuality_t quality) { default: return 0; } - return static_cast(g_configManager().getNumber(key, __FUNCTION__)); + return static_cast(g_configManager().getNumber(key)); } uint64_t PlayerWheel::getGemRevealCost(WheelGemQuality_t quality) { @@ -846,7 +846,7 @@ uint64_t PlayerWheel::getGemRevealCost(WheelGemQuality_t quality) { default: return 0; } - return static_cast(g_configManager().getNumber(key, __FUNCTION__)); + return static_cast(g_configManager().getNumber(key)); } void PlayerWheel::revealGem(WheelGemQuality_t quality) { diff --git a/src/database/database.cpp b/src/database/database.cpp index 50b795455d3..9ac892ef2be 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -23,7 +23,7 @@ Database &Database::getInstance() { } bool Database::connect() { - return connect(&g_configManager().getString(MYSQL_HOST, __FUNCTION__), &g_configManager().getString(MYSQL_USER, __FUNCTION__), &g_configManager().getString(MYSQL_PASS, __FUNCTION__), &g_configManager().getString(MYSQL_DB, __FUNCTION__), g_configManager().getNumber(SQL_PORT, __FUNCTION__), &g_configManager().getString(MYSQL_SOCK, __FUNCTION__)); + return connect(&g_configManager().getString(MYSQL_HOST), &g_configManager().getString(MYSQL_USER), &g_configManager().getString(MYSQL_PASS), &g_configManager().getString(MYSQL_DB), g_configManager().getNumber(SQL_PORT), &g_configManager().getString(MYSQL_SOCK)); } bool Database::connect(const std::string* host, const std::string* user, const std::string* password, const std::string* database, uint32_t port, const std::string* sock) { diff --git a/src/database/databasemanager.cpp b/src/database/databasemanager.cpp index 3e55799e45a..3d2d9c9fd64 100644 --- a/src/database/databasemanager.cpp +++ b/src/database/databasemanager.cpp @@ -16,7 +16,7 @@ bool DatabaseManager::optimizeTables() { Database &db = Database::getInstance(); std::ostringstream query; - query << "SELECT `TABLE_NAME` FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = " << db.escapeString(g_configManager().getString(MYSQL_DB, __FUNCTION__)) << " AND `DATA_FREE` > 0"; + query << "SELECT `TABLE_NAME` FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = " << db.escapeString(g_configManager().getString(MYSQL_DB)) << " AND `DATA_FREE` > 0"; DBResult_ptr result = db.storeQuery(query.str()); if (!result) { return false; @@ -45,14 +45,14 @@ bool DatabaseManager::tableExists(const std::string &tableName) { Database &db = Database::getInstance(); std::ostringstream query; - query << "SELECT `TABLE_NAME` FROM `information_schema`.`tables` WHERE `TABLE_SCHEMA` = " << db.escapeString(g_configManager().getString(MYSQL_DB, __FUNCTION__)) << " AND `TABLE_NAME` = " << db.escapeString(tableName) << " LIMIT 1"; + query << "SELECT `TABLE_NAME` FROM `information_schema`.`tables` WHERE `TABLE_SCHEMA` = " << db.escapeString(g_configManager().getString(MYSQL_DB)) << " AND `TABLE_NAME` = " << db.escapeString(tableName) << " LIMIT 1"; return db.storeQuery(query.str()).get() != nullptr; } bool DatabaseManager::isDatabaseSetup() { Database &db = Database::getInstance(); std::ostringstream query; - query << "SELECT `TABLE_NAME` FROM `information_schema`.`tables` WHERE `TABLE_SCHEMA` = " << db.escapeString(g_configManager().getString(MYSQL_DB, __FUNCTION__)); + query << "SELECT `TABLE_NAME` FROM `information_schema`.`tables` WHERE `TABLE_SCHEMA` = " << db.escapeString(g_configManager().getString(MYSQL_DB)); return db.storeQuery(query.str()).get() != nullptr; } @@ -84,7 +84,7 @@ void DatabaseManager::updateDatabase() { int32_t version = getDatabaseVersion(); do { std::ostringstream ss; - ss << g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + "/migrations/" << version << ".lua"; + ss << g_configManager().getString(DATA_DIRECTORY) + "/migrations/" << version << ".lua"; if (luaL_dofile(L, ss.str().c_str()) != 0) { g_logger().error("DatabaseManager::updateDatabase - Version: {}" "] {}", diff --git a/src/game/bank/bank.cpp b/src/game/bank/bank.cpp index 0a876e62210..b568d322810 100644 --- a/src/game/bank/bank.cpp +++ b/src/game/bank/bank.cpp @@ -110,7 +110,7 @@ bool Bank::transferTo(const std::shared_ptr &destination, const uint64_t a const auto destinationTownId = destinationPlayer->getTown()->getID(); const auto bankableTownId = bankablePlayer->getTown()->getID(); - const auto minTownIdToTransferFromMain = g_configManager().getNumber(MIN_TOWN_ID_TO_BANK_TRANSFER_FROM_MAIN, __FUNCTION__); + const auto minTownIdToTransferFromMain = g_configManager().getNumber(MIN_TOWN_ID_TO_BANK_TRANSFER_FROM_MAIN); if (destinationTownId < minTownIdToTransferFromMain && bankableTownId >= minTownIdToTransferFromMain) { g_logger().warn("[{}] Player {} is from main town, trying to transfer money to player {} in {} town.", __FUNCTION__, bankablePlayer->getName(), destinationPlayer->getName(), destinationTownId); diff --git a/src/game/functions/game_reload.cpp b/src/game/functions/game_reload.cpp index d42f7ec3c78..2b699ce8df3 100644 --- a/src/game/functions/game_reload.cpp +++ b/src/game/functions/game_reload.cpp @@ -151,7 +151,7 @@ bool GameReload::reloadVocations() { } bool GameReload::reloadCore() { - const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY); const bool coreLoaded = g_luaEnvironment().loadFile(coreFolder + "/core.lua", "core.lua") == 0; if (coreLoaded) { @@ -175,8 +175,8 @@ bool GameReload::reloadScripts() { g_scripts().clearAllScripts(); Zone::clearZones(); - const auto &datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); - const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + const auto &datapackFolder = g_configManager().getString(DATA_DIRECTORY); + const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY); g_scripts().loadScripts(coreFolder + "/scripts/lib", true, false); g_scripts().loadScripts(datapackFolder + "/scripts", false, true); @@ -198,8 +198,8 @@ bool GameReload::reloadItems() { bool GameReload::reloadMonsters() { g_monsters().clear(); - const auto &datapackFolder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__); - const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + const auto &datapackFolder = g_configManager().getString(DATA_DIRECTORY); + const auto &coreFolder = g_configManager().getString(CORE_DIRECTORY); const bool scriptsLoaded = g_scripts().loadScripts(coreFolder + "/scripts/lib", true, false); const bool monsterScriptsLoaded = g_scripts().loadScripts(datapackFolder + "/monster", false, true); diff --git a/src/game/game.cpp b/src/game/game.cpp index 388cd888b95..5692e4d9c3d 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -145,7 +145,7 @@ namespace InternalGame { return false; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS)) { if (std::shared_ptr houseTile = std::dynamic_pointer_cast(itemTile)) { const auto &house = houseTile->getHouse(); std::shared_ptr targetThing = g_game().internalGetThing(player, toPos, toStackPos, toItemId, STACKPOS_FIND_THING); @@ -485,10 +485,10 @@ void Game::loadBoostedCreature() { void Game::start(ServiceManager* manager) { // Game client protocols - manager->add(static_cast(g_configManager().getNumber(GAME_PORT, __FUNCTION__))); - manager->add(static_cast(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__))); + manager->add(static_cast(g_configManager().getNumber(GAME_PORT))); + manager->add(static_cast(g_configManager().getNumber(LOGIN_PORT))); // OT protocols - manager->add(static_cast(g_configManager().getNumber(STATUS_PORT, __FUNCTION__))); + manager->add(static_cast(g_configManager().getNumber(STATUS_PORT))); serviceManager = manager; @@ -518,7 +518,7 @@ void Game::start(ServiceManager* manager) { g_dispatcher().cycleEvent( EVENT_LUA_GARBAGE_COLLECTION, [this] { g_luaEnvironment().collectGarbage(); }, "Calling GC" ); - auto marketItemsPriceIntervalMinutes = g_configManager().getNumber(MARKET_REFRESH_PRICES, __FUNCTION__); + auto marketItemsPriceIntervalMinutes = g_configManager().getNumber(MARKET_REFRESH_PRICES); if (marketItemsPriceIntervalMinutes > 0) { auto marketItemsPriceIntervalMS = marketItemsPriceIntervalMinutes * 60000; if (marketItemsPriceIntervalMS < 60000) { @@ -644,14 +644,14 @@ void Game::loadItemsPrice() { } void Game::loadMainMap(const std::string &filename) { - Monster::despawnRange = g_configManager().getNumber(DEFAULT_DESPAWNRANGE, __FUNCTION__); - Monster::despawnRadius = g_configManager().getNumber(DEFAULT_DESPAWNRADIUS, __FUNCTION__); - map.loadMap(g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + "/world/" + filename + ".otbm", true, true, true, true, true); + Monster::despawnRange = g_configManager().getNumber(DEFAULT_DESPAWNRANGE); + Monster::despawnRadius = g_configManager().getNumber(DEFAULT_DESPAWNRADIUS); + map.loadMap(g_configManager().getString(DATA_DIRECTORY) + "/world/" + filename + ".otbm", true, true, true, true, true); } void Game::loadCustomMaps(const std::filesystem::path &customMapPath) { - Monster::despawnRange = g_configManager().getNumber(DEFAULT_DESPAWNRANGE, __FUNCTION__); - Monster::despawnRadius = g_configManager().getNumber(DEFAULT_DESPAWNRADIUS, __FUNCTION__); + Monster::despawnRange = g_configManager().getNumber(DEFAULT_DESPAWNRANGE); + Monster::despawnRadius = g_configManager().getNumber(DEFAULT_DESPAWNRADIUS); namespace fs = std::filesystem; @@ -682,7 +682,7 @@ void Game::loadCustomMaps(const std::filesystem::path &customMapPath) { } // Avoid loading main map again. - if (filename == g_configManager().getString(MAP_NAME, __FUNCTION__)) { + if (filename == g_configManager().getString(MAP_NAME)) { g_logger().warn("Custom map {} is main map", filename); continue; } @@ -1269,7 +1269,7 @@ FILELOADER_ERRORS Game::loadAppearanceProtobuf(const std::string &file) { Item::items.loadFromProtobuf(); // Only iterate other objects if necessary - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS)) { // Registering distance effects for (uint32_t it = 0; it < m_appearancesPtr->effect_size(); it++) { registeredMagicEffects.push_back(static_cast(m_appearancesPtr->effect(it).id())); @@ -1338,7 +1338,7 @@ void Game::playerMoveThing(uint32_t playerId, const Position &fromPos, uint16_t if (Position::areInRange<1, 1, 0>(movingCreature->getPosition(), player->getPosition())) { const auto &task = createPlayerTask( - g_configManager().getNumber(PUSH_DELAY, __FUNCTION__), + g_configManager().getNumber(PUSH_DELAY), [this, player, movingCreature, tile] { playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreature->getPosition(), tile->getPosition()); }, @@ -1856,11 +1856,11 @@ ReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::s } if (containerID == ITEM_GOLD_POUCH) { - if (g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, __FUNCTION__)) { + if (g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY)) { return RETURNVALUE_CONTAINERNOTENOUGHROOM; } - bool allowAnything = g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__); + bool allowAnything = g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING); if (!allowAnything && item->getID() != ITEM_GOLD_COIN && item->getID() != ITEM_PLATINUM_COIN && item->getID() != ITEM_CRYSTAL_COIN) { return RETURNVALUE_ITEMCANNOTBEMOVEDPOUCH; @@ -3098,7 +3098,7 @@ ReturnValue Game::internalCollectManagedItems(std::shared_ptr player, st } // Send money to the bank - if (g_configManager().getBoolean(AUTOBANK, __FUNCTION__)) { + if (g_configManager().getBoolean(AUTOBANK)) { if (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) { uint64_t money = 0; if (item->getID() == ITEM_PLATINUM_COIN) { @@ -3623,7 +3623,7 @@ void Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t f } bool isHotkey = (fromPos.x == 0xFFFF && fromPos.y == 0 && fromPos.z == 0); - if (isHotkey && !g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED, __FUNCTION__)) { + if (isHotkey && !g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED)) { return; } @@ -3639,7 +3639,7 @@ void Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t f return; } - bool canUseHouseItem = !g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) || InternalGame::playerCanUseItemOnHouseTile(player, item); + bool canUseHouseItem = !g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) || InternalGame::playerCanUseItemOnHouseTile(player, item); if (!canUseHouseItem && item->hasOwner() && !item->isOwner(player)) { player->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS); return; @@ -3768,7 +3768,7 @@ void Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPo } bool isHotkey = (pos.x == 0xFFFF && pos.y == 0 && pos.z == 0); - if (isHotkey && !g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED, __FUNCTION__)) { + if (isHotkey && !g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED)) { return; } @@ -3784,7 +3784,7 @@ void Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPo return; } - bool canUseHouseItem = !g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) || InternalGame::playerCanUseItemOnHouseTile(player, item); + bool canUseHouseItem = !g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) || InternalGame::playerCanUseItemOnHouseTile(player, item); if (!canUseHouseItem && item->hasOwner() && !item->isOwner(player)) { player->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS); return; @@ -3887,7 +3887,7 @@ void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uin } bool isHotkey = (fromPos.x == 0xFFFF && fromPos.y == 0 && fromPos.z == 0); - if (!g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED)) { if (creature->getPlayer() || isHotkey) { player->sendCancelMessage(RETURNVALUE_DIRECTPLAYERSHOOT); return; @@ -3911,7 +3911,7 @@ void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uin return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS)) { if (std::shared_ptr houseTile = std::dynamic_pointer_cast(item->getTile())) { const auto &house = houseTile->getHouse(); if (house && item->getRealParent() && item->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST)) { @@ -3931,10 +3931,10 @@ void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uin const std::shared_ptr monster = creature->getMonster(); if (monster && monster->isFamiliar() && creature->getMaster() && creature->getMaster()->getPlayer() == player && (it.isRune() || it.type == ITEM_TYPE_POTION)) { - player->setNextPotionAction(OTSYS_TIME() + g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->setNextPotionAction(OTSYS_TIME() + g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL)); if (it.isMultiUse()) { - player->sendUseItemCooldown(g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->sendUseItemCooldown(g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL)); } player->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT); @@ -4126,7 +4126,7 @@ void Game::playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stac return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { player->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT); return; } @@ -4181,7 +4181,7 @@ void Game::playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { player->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT); return; } @@ -4245,7 +4245,7 @@ void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Pos return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { player->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT); return; } @@ -4274,7 +4274,7 @@ void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Pos return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return; } @@ -4396,7 +4396,7 @@ void Game::playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t st return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { player->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT); return; } @@ -4835,7 +4835,7 @@ void Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t st return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS)) { if (std::shared_ptr houseTile = std::dynamic_pointer_cast(tradeItem->getTile())) { const auto &house = houseTile->getHouse(); if (house && tradeItem->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST)) { @@ -5250,7 +5250,7 @@ void Game::playerBuyItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint } if (inBackpacks || it.isContainer()) { - uint32_t maxContainer = static_cast(g_configManager().getNumber(MAX_CONTAINER, __FUNCTION__)); + uint32_t maxContainer = static_cast(g_configManager().getNumber(MAX_CONTAINER)); auto backpack = player->getInventoryItem(CONST_SLOT_BACKPACK); auto mainBackpack = backpack ? backpack->getContainer() : nullptr; @@ -5619,7 +5619,7 @@ void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t categor } std::shared_ptr container = thing->getContainer(); - auto allowConfig = g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__) || g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, __FUNCTION__); + auto allowConfig = g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING) || g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY); if (!container || ((container->getID() == ITEM_GOLD_POUCH && category != OBJECTCATEGORY_GOLD) && !allowConfig)) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return; @@ -5971,7 +5971,7 @@ void Game::playerTurn(uint32_t playerId, Direction dir) { } void Game::playerRequestOutfit(uint32_t playerId) { - if (!g_configManager().getBoolean(ALLOW_CHANGEOUTFIT, __FUNCTION__)) { + if (!g_configManager().getBoolean(ALLOW_CHANGEOUTFIT)) { return; } @@ -5993,7 +5993,7 @@ void Game::playerToggleMount(uint32_t playerId, bool mount) { } void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit, uint8_t isMountRandomized /* = 0*/) { - if (!g_configManager().getBoolean(ALLOW_CHANGEOUTFIT, __FUNCTION__)) { + if (!g_configManager().getBoolean(ALLOW_CHANGEOUTFIT)) { return; } @@ -6034,7 +6034,7 @@ void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit, uint8_t isMoun return; } - if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && playerTile->hasFlag(TILESTATE_PROTECTIONZONE)) { + if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ) && playerTile->hasFlag(TILESTATE_PROTECTIONZONE)) { outfit.lookMount = 0; } @@ -6161,7 +6161,7 @@ bool Game::playerSaySpell(std::shared_ptr player, SpeakClasses type, con result = g_spells().playerSaySpell(player, words); if (result == TALKACTION_BREAK) { - if (!g_configManager().getBoolean(PUSH_WHEN_ATTACKING, __FUNCTION__)) { + if (!g_configManager().getBoolean(PUSH_WHEN_ATTACKING)) { player->cancelPush(); } return player->saySpell(type, words, false); @@ -6889,15 +6889,15 @@ float Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, levelDifference = std::abs(levelDifference); bool isLowerLevel = target->getLevel() < attacker->getLevel(); - int32_t maxLevelDifference = g_configManager().getNumber(PVP_MAX_LEVEL_DIFFERENCE, __FUNCTION__); + int32_t maxLevelDifference = g_configManager().getNumber(PVP_MAX_LEVEL_DIFFERENCE); levelDifference = std::min(levelDifference, maxLevelDifference); float levelDiffRate = 1.0; if (isLowerLevel) { - float rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100; + float rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL) / 100; levelDiffRate += levelDifference * rateDamageTakenByLevel; } else { - float rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100; + float rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL) / 100; levelDiffRate -= levelDifference * rateDamageReductionByLevel; } @@ -8144,7 +8144,7 @@ void Game::loadMotdNum() { result = db.storeQuery("SELECT `value` FROM `server_config` WHERE `config` = 'motd_hash'"); if (result) { motdHash = result->getString("value"); - if (motdHash != transformToSHA1(g_configManager().getString(SERVER_MOTD, __FUNCTION__))) { + if (motdHash != transformToSHA1(g_configManager().getString(SERVER_MOTD))) { ++motdNum; } } else { @@ -8160,7 +8160,7 @@ void Game::saveMotdNum() const { db.executeQuery(query.str()); query.str(std::string()); - query << "UPDATE `server_config` SET `value` = '" << transformToSHA1(g_configManager().getString(SERVER_MOTD, __FUNCTION__)) << "' WHERE `config` = 'motd_hash'"; + query << "UPDATE `server_config` SET `value` = '" << transformToSHA1(g_configManager().getString(SERVER_MOTD)) << "' WHERE `config` = 'motd_hash'"; db.executeQuery(query.str()); } @@ -8886,12 +8886,12 @@ bool checkCanInitCreateMarketOffer(std::shared_ptr player, uint8_t type, g_logger().debug("{} - Offer amount: {}", __FUNCTION__, amount); - if (g_configManager().getBoolean(MARKET_PREMIUM, __FUNCTION__) && !player->isPremium()) { + if (g_configManager().getBoolean(MARKET_PREMIUM) && !player->isPremium()) { player->sendTextMessage(MESSAGE_MARKET, "Only premium accounts may create offers for that object."); return false; } - const uint32_t maxOfferCount = g_configManager().getNumber(MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, __FUNCTION__); + const uint32_t maxOfferCount = g_configManager().getNumber(MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER); if (maxOfferCount != 0 && IOMarket::getPlayerOfferCount(player->getGUID()) >= maxOfferCount) { offerStatus << "Player " << player->getName() << "excedeed max offer count " << maxOfferCount; return false; @@ -9059,7 +9059,7 @@ void Game::playerCancelMarketOffer(uint32_t playerId, uint32_t timestamp, uint16 IOMarket::moveOfferToHistory(offer.id, OFFERSTATE_CANCELLED); offer.amount = 0; - offer.timestamp += g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + offer.timestamp += g_configManager().getNumber(MARKET_OFFER_DURATION); player->sendMarketCancelOffer(offer); // Send market window again for update stats player->sendMarketEnter(player->getLastDepotId()); @@ -9320,7 +9320,7 @@ void Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16 return; } - const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION); IOMarket::appendHistory(player->getGUID(), (offer.type == MARKETACTION_BUY ? MARKETACTION_SELL : MARKETACTION_BUY), offer.itemId, amount, offer.price, time(nullptr), offer.tier, OFFERSTATE_ACCEPTEDEX); @@ -9420,8 +9420,8 @@ void Game::playerForgeFuseItems(uint32_t playerId, ForgeAction_t actionType, uin player->updateUIExhausted(); uint8_t coreCount = (usedCore ? 1 : 0) + (reduceTierLoss ? 1 : 0); - auto baseSuccess = static_cast(g_configManager().getNumber(FORGE_BASE_SUCCESS_RATE, __FUNCTION__)); - auto coreSuccess = usedCore ? g_configManager().getNumber(FORGE_BONUS_SUCCESS_RATE, __FUNCTION__) : 0; + auto baseSuccess = static_cast(g_configManager().getNumber(FORGE_BASE_SUCCESS_RATE)); + auto coreSuccess = usedCore ? g_configManager().getNumber(FORGE_BONUS_SUCCESS_RATE) : 0; auto finalRate = baseSuccess + coreSuccess; auto roll = static_cast(uniform_random(1, 100)) <= finalRate; @@ -9551,7 +9551,7 @@ void Game::playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, con return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return; } @@ -9650,7 +9650,7 @@ void Game::playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t st return; } - if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { + if (g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS) && !InternalGame::playerCanUseItemOnHouseTile(player, item)) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return; } @@ -10006,7 +10006,7 @@ void Game::sendUpdateCreature(std::shared_ptr creature) { } uint32_t Game::makeInfluencedMonster() { - if (auto influencedLimit = g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__); + if (auto influencedLimit = g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT); // Condition forgeableMonsters.empty() || influencedMonsters.size() >= influencedLimit) { return 0; @@ -10087,7 +10087,7 @@ uint32_t Game::makeFiendishMonster(uint32_t forgeableMonsterId /* = 0*/, bool cr } } - if (auto fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT, __FUNCTION__); + if (auto fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT); // Condition forgeableMonsters.empty() || fiendishMonsters.size() >= fiendishLimit) { return 0; @@ -10126,8 +10126,8 @@ uint32_t Game::makeFiendishMonster(uint32_t forgeableMonsterId /* = 0*/, bool cr } // Get interval time to fiendish - std::string saveIntervalType = g_configManager().getString(FORGE_FIENDISH_INTERVAL_TYPE, __FUNCTION__); - auto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME, __FUNCTION__).c_str()); + std::string saveIntervalType = g_configManager().getString(FORGE_FIENDISH_INTERVAL_TYPE); + auto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME).c_str()); int intervalTime = 0; time_t timeToChangeFiendish; if (saveIntervalType == "second") { @@ -10246,7 +10246,7 @@ void Game::updateForgeableMonsters() { } } - uint32_t fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT, __FUNCTION__); // Fiendish Creatures limit + uint32_t fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT); // Fiendish Creatures limit if (fiendishMonsters.size() < fiendishLimit) { createFiendishMonsters(); } @@ -10254,7 +10254,7 @@ void Game::updateForgeableMonsters() { void Game::createFiendishMonsters() { uint32_t created = 0; - uint32_t fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT, __FUNCTION__); // Fiendish Creatures limit + uint32_t fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT); // Fiendish Creatures limit while (fiendishMonsters.size() < fiendishLimit) { if (fiendishMonsters.size() >= fiendishLimit) { g_logger().warn("[{}] - Returning in creation of Fiendish, size: {}, max is: {}.", __FUNCTION__, fiendishMonsters.size(), fiendishLimit); @@ -10273,7 +10273,7 @@ void Game::createFiendishMonsters() { void Game::createInfluencedMonsters() { uint32_t created = 0; - uint32_t influencedLimit = g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__); + uint32_t influencedLimit = g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT); while (created < influencedLimit) { if (influencedMonsters.size() >= influencedLimit) { g_logger().warn("[{}] - Returning in creation of Influenced, size: {}, max is: {}.", __FUNCTION__, influencedMonsters.size(), influencedLimit); @@ -10300,7 +10300,7 @@ void Game::checkForgeEventId(uint32_t monsterId) { bool Game::addInfluencedMonster(std::shared_ptr monster) { if (monster && monster->canBeForgeMonster()) { - if (auto maxInfluencedMonsters = static_cast(g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__)); + if (auto maxInfluencedMonsters = static_cast(g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT)); // If condition (influencedMonsters.size() + 1) > maxInfluencedMonsters) { return false; @@ -10406,7 +10406,7 @@ void Game::playerCheckActivity(const std::string &playerName, int interval) { if (!player->isAccessPlayer()) { player->m_deathTime += interval; - const int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__); + const int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES); if (player->m_deathTime > (kickAfterMinutes * 60000) + 60000) { g_logger().info("Player with name '{}' has logged out due to inactivity after death", player->getName()); g_game().removePlayerUniqueLogin(playerName); @@ -10481,7 +10481,7 @@ const std::unique_ptr &Game::getIOWheel() const { } void Game::transferHouseItemsToDepot() { - if (!g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__)) { + if (!g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART)) { return; } diff --git a/src/game/scheduling/events_scheduler.cpp b/src/game/scheduling/events_scheduler.cpp index 3089d9cdcd6..44005fce11f 100644 --- a/src/game/scheduling/events_scheduler.cpp +++ b/src/game/scheduling/events_scheduler.cpp @@ -13,7 +13,7 @@ bool EventsScheduler::loadScheduleEventFromXml() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/events.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/XML/events.xml"; if (!doc.load_file(folder.c_str())) { printXMLError(__FUNCTION__, folder, doc.load_file(folder.c_str())); consoleHandlerExit(); diff --git a/src/game/scheduling/save_manager.cpp b/src/game/scheduling/save_manager.cpp index 4d98da9900f..254786f747d 100644 --- a/src/game/scheduling/save_manager.cpp +++ b/src/game/scheduling/save_manager.cpp @@ -45,7 +45,7 @@ void SaveManager::scheduleAll() { m_scheduledAt = scheduledAt; // Disable save async if the config is set to false - if (!g_configManager().getBoolean(TOGGLE_SAVE_ASYNC, __FUNCTION__)) { + if (!g_configManager().getBoolean(TOGGLE_SAVE_ASYNC)) { saveAll(); return; } @@ -67,7 +67,7 @@ void SaveManager::schedulePlayer(std::weak_ptr playerPtr) { } // Disable save async if the config is set to false - if (!g_configManager().getBoolean(TOGGLE_SAVE_ASYNC, __FUNCTION__)) { + if (!g_configManager().getBoolean(TOGGLE_SAVE_ASYNC)) { if (g_game().getGameState() == GAME_STATE_NORMAL) { logger.debug("Saving player {}.", playerToSave->getName()); } diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp index e6c86b70917..80881db361c 100644 --- a/src/io/functions/iologindata_load_player.cpp +++ b/src/io/functions/iologindata_load_player.cpp @@ -96,9 +96,9 @@ bool IOLoginDataLoad::preLoadPlayer(std::shared_ptr player, const std::s uint32_t premiumDays = player->getAccount()->getPremiumRemainingDays(); uint32_t premiumDaysPurchased = player->getAccount()->getPremiumDaysPurchased(); - player->loyaltyPoints = player->getAccount()->getAccountAgeInDays() * g_configManager().getNumber(LOYALTY_POINTS_PER_CREATION_DAY, __FUNCTION__) - + (premiumDaysPurchased - premiumDays) * g_configManager().getNumber(LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, __FUNCTION__) - + premiumDaysPurchased * g_configManager().getNumber(LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, __FUNCTION__); + player->loyaltyPoints = player->getAccount()->getAccountAgeInDays() * g_configManager().getNumber(LOYALTY_POINTS_PER_CREATION_DAY) + + (premiumDaysPurchased - premiumDays) * g_configManager().getNumber(LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT) + + premiumDaysPurchased * g_configManager().getNumber(LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED); return true; } @@ -246,7 +246,7 @@ void IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DB } player->defaultOutfit.lookType = result->getNumber("looktype"); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && player->defaultOutfit.lookType != 0 && !g_game().isLookTypeRegistered(player->defaultOutfit.lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && player->defaultOutfit.lookType != 0 && !g_game().isLookTypeRegistered(player->defaultOutfit.lookType)) { g_logger().warn("[{}] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", __FUNCTION__, player->defaultOutfit.lookType); return; } @@ -262,7 +262,7 @@ void IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DB player->defaultOutfit.lookMountFeet = static_cast(result->getNumber("lookmountfeet")); player->defaultOutfit.lookFamiliarsType = result->getNumber("lookfamiliarstype"); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && player->defaultOutfit.lookFamiliarsType != 0 && !g_game().isLookTypeRegistered(player->defaultOutfit.lookFamiliarsType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && player->defaultOutfit.lookFamiliarsType != 0 && !g_game().isLookTypeRegistered(player->defaultOutfit.lookFamiliarsType)) { g_logger().warn("[{}] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", __FUNCTION__, player->defaultOutfit.lookFamiliarsType); return; } @@ -326,7 +326,7 @@ void IOLoginDataLoad::loadPlayerKills(std::shared_ptr player, DBResult_p if ((result = db.storeQuery(query.str()))) { do { time_t killTime = result->getNumber("time"); - if ((time(nullptr) - killTime) <= g_configManager().getNumber(FRAG_TIME, __FUNCTION__)) { + if ((time(nullptr) - killTime) <= g_configManager().getNumber(FRAG_TIME)) { player->unjustifiedKills.emplace_back(result->getNumber("target"), killTime, result->getNumber("unavenged")); } } while (result->next()); @@ -474,7 +474,7 @@ void IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, D return; } - bool oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && player->getProtocolVersion() < 1200; + bool oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL) && player->getProtocolVersion() < 1200; auto query = fmt::format("SELECT pid, sid, itemtype, count, attributes FROM player_items WHERE player_id = {} ORDER BY sid DESC", player->getGUID()); ItemsMap inventoryItems; @@ -728,7 +728,7 @@ void IOLoginDataLoad::loadPlayerPreyClass(std::shared_ptr player, DBResu return; } - if (g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) { + if (g_configManager().getBoolean(PREY_ENABLED)) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `player_prey` WHERE `player_id` = " << player->getGUID(); @@ -775,7 +775,7 @@ void IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, return; } - if (g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { Database &db = Database::getInstance(); std::ostringstream query; query << "SELECT * FROM `player_taskhunt` WHERE `player_id` = " << player->getGUID(); diff --git a/src/io/functions/iologindata_save_player.cpp b/src/io/functions/iologindata_save_player.cpp index 52ea53aaf28..a5caadd709c 100644 --- a/src/io/functions/iologindata_save_player.cpp +++ b/src/io/functions/iologindata_save_player.cpp @@ -586,7 +586,7 @@ bool IOLoginDataSave::savePlayerPreyClass(std::shared_ptr player) { } Database &db = Database::getInstance(); - if (g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) { + if (g_configManager().getBoolean(PREY_ENABLED)) { std::ostringstream query; for (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) { if (const auto &slot = player->getPreySlotById(static_cast(slotId))) { @@ -640,7 +640,7 @@ bool IOLoginDataSave::savePlayerTaskHuntingClass(std::shared_ptr player) } Database &db = Database::getInstance(); - if (g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { std::ostringstream query; for (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) { if (const auto &slot = player->getTaskHuntingSlotById(static_cast(slotId))) { diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index c32c078218d..d834f9d0984 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -26,7 +26,7 @@ bool IOLoginData::gameWorldAuthentication(const std::string &accountDescriptor, return false; } - if (g_configManager().getString(AUTH_TYPE, __FUNCTION__) == "session") { + if (g_configManager().getString(AUTH_TYPE) == "session") { if (!account.authenticate()) { return false; } diff --git a/src/io/iomap.hpp b/src/io/iomap.hpp index 78fcc23191f..b730f664853 100644 --- a/src/io/iomap.hpp +++ b/src/io/iomap.hpp @@ -32,7 +32,7 @@ class IOMap { if (map->monsterfile.empty()) { // OTBM file doesn't tell us about the monsterfile, // Lets guess it is mapname-monster.xml. - map->monsterfile = g_configManager().getString(MAP_NAME, __FUNCTION__); + map->monsterfile = g_configManager().getString(MAP_NAME); map->monsterfile += "-monster.xml"; } @@ -48,7 +48,7 @@ class IOMap { if (map->zonesfile.empty()) { // OTBM file doesn't tell us about the zonesfile, // Lets guess it is mapname-zone.xml. - map->zonesfile = g_configManager().getString(MAP_NAME, __FUNCTION__); + map->zonesfile = g_configManager().getString(MAP_NAME); map->zonesfile += "-zones.xml"; } @@ -64,7 +64,7 @@ class IOMap { if (map->npcfile.empty()) { // OTBM file doesn't tell us about the npcfile, // Lets guess it is mapname-npc.xml. - map->npcfile = g_configManager().getString(MAP_NAME, __FUNCTION__); + map->npcfile = g_configManager().getString(MAP_NAME); map->npcfile += "-npc.xml"; } @@ -80,7 +80,7 @@ class IOMap { if (map->housefile.empty()) { // OTBM file doesn't tell us about the housefile, // Lets guess it is mapname-house.xml. - map->housefile = g_configManager().getString(MAP_NAME, __FUNCTION__); + map->housefile = g_configManager().getString(MAP_NAME); map->housefile += "-house.xml"; } diff --git a/src/io/iomapserialize.cpp b/src/io/iomapserialize.cpp index 7351cde1cb9..220b50a85e6 100644 --- a/src/io/iomapserialize.cpp +++ b/src/io/iomapserialize.cpp @@ -46,7 +46,7 @@ void IOMapSerialize::loadHouseItems(Map* map) { while (item_count--) { if (auto houseTile = std::dynamic_pointer_cast(tile)) { const auto &house = houseTile->getHouse(); - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); if (!isTransferOnRestart && house->getOwner() == 0) { g_logger().trace("Skipping load item from house id: {}, position: {}, house does not have owner", house->getId(), house->getEntryPosition().toString()); house->clearHouseInfo(false); @@ -285,7 +285,7 @@ bool IOMapSerialize::loadHouseInfo() { uint32_t owner = result->getNumber("owner"); int32_t newOwner = result->getNumber("new_owner"); // Transfer house owner - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); if (isTransferOnRestart && newOwner >= 0) { g_game().setTransferPlayerHouseItems(houseId, owner); if (newOwner == 0) { diff --git a/src/io/iomarket.cpp b/src/io/iomarket.cpp index 71e707e0bd9..72f245c56d6 100644 --- a/src/io/iomarket.cpp +++ b/src/io/iomarket.cpp @@ -16,7 +16,7 @@ uint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) { auto tier = static_cast(std::atoi(string.c_str())); - if (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__)) { + if (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER)) { g_logger().error("{} - Failed to get number value {} for tier table result", __FUNCTION__, tier); return 0; } @@ -39,7 +39,7 @@ MarketOfferList IOMarket::getActiveOffers(MarketAction_t action) { return offerList; } - const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION); do { MarketOffer offer; @@ -70,7 +70,7 @@ MarketOfferList IOMarket::getActiveOffers(MarketAction_t action, uint16_t itemId return offerList; } - const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION); do { MarketOffer offer; @@ -93,7 +93,7 @@ MarketOfferList IOMarket::getActiveOffers(MarketAction_t action, uint16_t itemId MarketOfferList IOMarket::getOwnOffers(MarketAction_t action, uint32_t playerId) { MarketOfferList offerList; - const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION); std::ostringstream query; query << "SELECT `id`, `amount`, `price`, `created`, `itemtype`, `tier` FROM `market_offers` WHERE `player_id` = " << playerId << " AND `sale` = " << action; @@ -225,13 +225,13 @@ void IOMarket::processExpiredOffers(DBResult_ptr result, bool) { } void IOMarket::checkExpiredOffers() { - const time_t lastExpireDate = getTimeNow() - g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + const time_t lastExpireDate = getTimeNow() - g_configManager().getNumber(MARKET_OFFER_DURATION); std::ostringstream query; query << "SELECT `id`, `amount`, `price`, `itemtype`, `player_id`, `sale`, `tier` FROM `market_offers` WHERE `created` <= " << lastExpireDate; g_databaseTasks().store(query.str(), IOMarket::processExpiredOffers); - int32_t checkExpiredMarketOffersEachMinutes = g_configManager().getNumber(CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, __FUNCTION__); + int32_t checkExpiredMarketOffersEachMinutes = g_configManager().getNumber(CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES); if (checkExpiredMarketOffersEachMinutes <= 0) { return; } @@ -253,7 +253,7 @@ uint32_t IOMarket::getPlayerOfferCount(uint32_t playerId) { MarketOfferEx IOMarket::getOfferByCounter(uint32_t timestamp, uint16_t counter) { MarketOfferEx offer; - const int32_t created = timestamp - g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + const int32_t created = timestamp - g_configManager().getNumber(MARKET_OFFER_DURATION); std::ostringstream query; query << "SELECT `id`, `sale`, `itemtype`, `amount`, `created`, `price`, `player_id`, `anonymous`, `tier`, (SELECT `name` FROM `players` WHERE `id` = `player_id`) AS `player_name` FROM `market_offers` WHERE `created` = " << created << " AND (`id` & 65535) = " << counter << " LIMIT 1"; diff --git a/src/io/ioprey.cpp b/src/io/ioprey.cpp index abea75aa6c9..8dcbfe10e46 100644 --- a/src/io/ioprey.cpp +++ b/src/io/ioprey.cpp @@ -24,7 +24,7 @@ PreySlot::PreySlot(PreySlot_t id) : eraseBonus(); reloadBonusValue(); reloadBonusType(); - freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000; + freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME) * 1000; } void PreySlot::reloadBonusType() { @@ -58,7 +58,7 @@ void PreySlot::reloadBonusValue() { void PreySlot::reloadMonsterGrid(std::vector blackList, uint32_t level) { raceIdList.clear(); - if (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(PREY_ENABLED)) { return; } @@ -133,13 +133,13 @@ void PreySlot::reloadMonsterGrid(std::vector blackList, uint32_t level // Task hunting class TaskHuntingSlot::TaskHuntingSlot(PreySlot_t id) : id(id) { - freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000; + freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME) * 1000; } void TaskHuntingSlot::reloadMonsterGrid(std::vector blackList, uint32_t level) { raceIdList.clear(); - if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { return; } @@ -212,7 +212,7 @@ void TaskHuntingSlot::reloadMonsterGrid(std::vector blackList, uint32_ } void TaskHuntingSlot::reloadReward() { - if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { return; } @@ -262,10 +262,10 @@ void IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) co slot && slot->isOccupied()) { if (slot->bonusTimeLeft <= amount) { if (slot->option == PreyOption_AutomaticReroll) { - if (player->usePreyCards(static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE, __FUNCTION__)))) { + if (player->usePreyCards(static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE)))) { slot->reloadBonusType(); slot->reloadBonusValue(); - slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__)); + slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME)); player->sendTextMessage(MESSAGE_STATUS, "Your prey bonus type and time has been succesfully reseted."); player->reloadPreySlot(static_cast(slotId)); continue; @@ -273,8 +273,8 @@ void IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) co player->sendTextMessage(MESSAGE_STATUS, "You don't have enought prey cards to enable automatic reroll when your slot expire."); } else if (slot->option == PreyOption_Locked) { - if (player->usePreyCards(static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE, __FUNCTION__)))) { - slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__)); + if (player->usePreyCards(static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE)))) { + slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME)); player->sendTextMessage(MESSAGE_STATUS, "Your prey bonus time has been succesfully reseted."); player->reloadPreySlot(static_cast(slotId)); continue; @@ -308,7 +308,7 @@ void IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, player->sendMessageDialog("You don't have enought money to reroll the prey slot."); return; } else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) { - slot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000; + slot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME) * 1000; } else { g_metrics().addCounter("balance_decrease", player->getPreyRerollPrice(), { { "player", player->getName() }, { "context", "prey_reroll" } }); } @@ -319,7 +319,7 @@ void IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, } slot->reloadMonsterGrid(player->getPreyBlackList(), player->getLevel()); } else if (action == PreyAction_ListAll_Cards) { - if (!player->usePreyCards(static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE, __FUNCTION__)))) { + if (!player->usePreyCards(static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE)))) { player->sendMessageDialog("You don't have enought prey cards to choose a monsters on the list."); return; } @@ -351,19 +351,19 @@ void IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, slot->state = PreyDataState_Active; slot->selectedRaceId = raceId; slot->removeMonsterType(raceId); - slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__)); + slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME)); } else if (action == PreyAction_BonusReroll) { if (!slot->isOccupied()) { player->sendMessageDialog("You don't have any active monster on this prey slot."); return; - } else if (!player->usePreyCards(static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE, __FUNCTION__)))) { + } else if (!player->usePreyCards(static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE)))) { player->sendMessageDialog("You don't have enought prey cards to reroll this prey slot bonus type."); return; } slot->reloadBonusType(); slot->reloadBonusValue(); - slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__)); + slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME)); } else if (action == PreyAction_MonsterSelection) { if (slot->isOccupied()) { player->sendMessageDialog("You already have an active monster on this prey slot."); @@ -383,12 +383,12 @@ void IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, slot->state = PreyDataState_Active; slot->selectedRaceId = slot->raceIdList[index]; slot->removeMonsterType(slot->selectedRaceId); - slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__)); + slot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME)); } else if (action == PreyAction_Option) { - if (option == PreyOption_AutomaticReroll && player->getPreyCards() < static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE, __FUNCTION__))) { + if (option == PreyOption_AutomaticReroll && player->getPreyCards() < static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE))) { player->sendMessageDialog("You don't have enought prey cards to enable automatic reroll when your slot expire."); return; - } else if (option == PreyOption_Locked && player->getPreyCards() < static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE, __FUNCTION__))) { + } else if (option == PreyOption_Locked && player->getPreyCards() < static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE))) { player->sendMessageDialog("You don't have enought prey cards to lock monster and bonus when the slot expire."); return; } @@ -419,7 +419,7 @@ void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t s player->sendMessageDialog("You don't have enought money to reroll the task hunting slot."); return; } else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) { - slot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000; + slot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME) * 1000; } else { g_metrics().addCounter("balance_decrease", player->getTaskHuntingRerollPrice(), { { "player", player->getName() }, { "context", "hunting_task_reroll" } }); } @@ -429,7 +429,7 @@ void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t s slot->state = PreyTaskDataState_Selection; slot->reloadMonsterGrid(player->getTaskHuntingBlackList(), player->getLevel()); } else if (action == PreyTaskAction_RewardsReroll) { - if (!player->usePreyCards(static_cast(g_configManager().getNumber(TASK_HUNTING_BONUS_REROLL_PRICE, __FUNCTION__)))) { + if (!player->usePreyCards(static_cast(g_configManager().getNumber(TASK_HUNTING_BONUS_REROLL_PRICE)))) { player->sendMessageDialog("You don't have enought prey cards to reroll you task reward rarity."); return; } @@ -441,7 +441,7 @@ void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t s ss << "You need to wait " << ((slot->disabledUntilTimeStamp - OTSYS_TIME()) / 60000) << " minutes to select a new creature on task."; player->sendMessageDialog(ss.str()); return; - } else if (!player->usePreyCards(static_cast(g_configManager().getNumber(TASK_HUNTING_SELECTION_LIST_PRICE, __FUNCTION__)))) { + } else if (!player->usePreyCards(static_cast(g_configManager().getNumber(TASK_HUNTING_SELECTION_LIST_PRICE)))) { player->sendMessageDialog("You don't have enought prey cards to choose a creature on list for you task hunting slot."); return; } @@ -529,7 +529,7 @@ void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t s player->addTaskHuntingPoints(reward); player->sendMessageDialog(ss.str()); slot->reloadMonsterGrid(player->getTaskHuntingBlackList(), player->getLevel()); - slot->disabledUntilTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_LIMIT_EXHAUST, __FUNCTION__) * 1000; + slot->disabledUntilTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_LIMIT_EXHAUST) * 1000; } } else { g_logger().warn("[IOPrey::parseTaskHuntingAction] - Unknown task action: {}", fmt::underlying(action)); @@ -539,7 +539,7 @@ void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t s } void IOPrey::initializeTaskHuntOptions() { - if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { return; } diff --git a/src/items/bed.cpp b/src/items/bed.cpp index 8bfd6d119a5..1ebd62331c5 100644 --- a/src/items/bed.cpp +++ b/src/items/bed.cpp @@ -248,8 +248,8 @@ void BedItem::regeneratePlayer(std::shared_ptr player) const { regen = sleptTime / 30; } - player->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false); - player->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__)); + player->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN), false); + player->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN)); } const int32_t soulRegen = sleptTime / (60 * 15); // RATE_SOUL_REGEN_SPEED? diff --git a/src/items/containers/container.cpp b/src/items/containers/container.cpp index 802f9d9063f..ce49d2efc1c 100644 --- a/src/items/containers/container.cpp +++ b/src/items/containers/container.cpp @@ -15,16 +15,16 @@ Container::Container(uint16_t type) : Container(type, items[type].maxItems) { - m_maxItems = static_cast(g_configManager().getNumber(MAX_CONTAINER_ITEM, __FUNCTION__)); + m_maxItems = static_cast(g_configManager().getNumber(MAX_CONTAINER_ITEM)); if (getID() == ITEM_GOLD_POUCH) { pagination = true; - m_maxItems = g_configManager().getNumber(LOOTPOUCH_MAXLIMIT, __FUNCTION__); + m_maxItems = g_configManager().getNumber(LOOTPOUCH_MAXLIMIT); maxSize = 32; } if (isStoreInbox()) { pagination = true; - m_maxItems = g_configManager().getNumber(STOREINBOX_MAXLIMIT, __FUNCTION__); + m_maxItems = g_configManager().getNumber(STOREINBOX_MAXLIMIT); maxSize = 32; } } @@ -509,7 +509,7 @@ ReturnValue Container::queryAdd(int32_t addIndex, const std::shared_ptr & if (const auto topParentContainer = getTopParentContainer()) { if (const auto addContainer = item->getContainer()) { uint32_t addContainerCount = addContainer->getContainerHoldingCount() + 1; - uint32_t maxContainer = static_cast(g_configManager().getNumber(MAX_CONTAINER, __FUNCTION__)); + uint32_t maxContainer = static_cast(g_configManager().getNumber(MAX_CONTAINER)); if (addContainerCount + topParentContainer->getContainerHoldingCount() > maxContainer) { return RETURNVALUE_CONTAINERISFULL; } diff --git a/src/items/functions/item/item_parse.cpp b/src/items/functions/item/item_parse.cpp index 96fa33c2a7b..f9808e8f912 100644 --- a/src/items/functions/item/item_parse.cpp +++ b/src/items/functions/item/item_parse.cpp @@ -125,8 +125,8 @@ void ItemParse::parseDescription(const std::string &tmpStrValue, pugi::xml_attri std::string stringValue = tmpStrValue; if (stringValue == "description") { itemType.description = valueAttribute.as_string(); - if (g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, __FUNCTION__) && itemType.id == ITEM_GOLD_POUCH) { - auto pouchLimit = g_configManager().getNumber(LOOTPOUCH_MAXLIMIT, __FUNCTION__); + if (g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY) && itemType.id == ITEM_GOLD_POUCH) { + auto pouchLimit = g_configManager().getNumber(LOOTPOUCH_MAXLIMIT); itemType.description = fmt::format("A bag with {} slots where you can hold your loots.", pouchLimit); itemType.name = "loot pouch"; } @@ -897,7 +897,7 @@ void ItemParse::parseAugment(const std::string &tmpStrValue, pugi::xml_node attr if (hasValueDescrition) { const auto it = AugmentWithoutValueDescriptionDefaultKeys.find(augmentType); if (it != AugmentWithoutValueDescriptionDefaultKeys.end()) { - augmentValue = g_configManager().getNumber(it->second, __FUNCTION__); + augmentValue = g_configManager().getNumber(it->second); } } diff --git a/src/items/item.hpp b/src/items/item.hpp index a9774c902cd..9bea63158f3 100644 --- a/src/items/item.hpp +++ b/src/items/item.hpp @@ -715,9 +715,9 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { return 0; } return quadraticPoly( - g_configManager().getFloat(RUSE_CHANCE_FORMULA_A, __FUNCTION__), - g_configManager().getFloat(RUSE_CHANCE_FORMULA_B, __FUNCTION__), - g_configManager().getFloat(RUSE_CHANCE_FORMULA_C, __FUNCTION__), + g_configManager().getFloat(RUSE_CHANCE_FORMULA_A), + g_configManager().getFloat(RUSE_CHANCE_FORMULA_B), + g_configManager().getFloat(RUSE_CHANCE_FORMULA_C), getTier() ); } @@ -727,9 +727,9 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { return 0; } return quadraticPoly( - g_configManager().getFloat(ONSLAUGHT_CHANCE_FORMULA_A, __FUNCTION__), - g_configManager().getFloat(ONSLAUGHT_CHANCE_FORMULA_B, __FUNCTION__), - g_configManager().getFloat(ONSLAUGHT_CHANCE_FORMULA_C, __FUNCTION__), + g_configManager().getFloat(ONSLAUGHT_CHANCE_FORMULA_A), + g_configManager().getFloat(ONSLAUGHT_CHANCE_FORMULA_B), + g_configManager().getFloat(ONSLAUGHT_CHANCE_FORMULA_C), getTier() ); } @@ -739,9 +739,9 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { return 0; } return quadraticPoly( - g_configManager().getFloat(MOMENTUM_CHANCE_FORMULA_A, __FUNCTION__), - g_configManager().getFloat(MOMENTUM_CHANCE_FORMULA_B, __FUNCTION__), - g_configManager().getFloat(MOMENTUM_CHANCE_FORMULA_C, __FUNCTION__), + g_configManager().getFloat(MOMENTUM_CHANCE_FORMULA_A), + g_configManager().getFloat(MOMENTUM_CHANCE_FORMULA_B), + g_configManager().getFloat(MOMENTUM_CHANCE_FORMULA_C), getTier() ); } @@ -751,9 +751,9 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { return 0; } return quadraticPoly( - g_configManager().getFloat(TRANSCENDANCE_CHANCE_FORMULA_A, __FUNCTION__), - g_configManager().getFloat(TRANSCENDANCE_CHANCE_FORMULA_B, __FUNCTION__), - g_configManager().getFloat(TRANSCENDANCE_CHANCE_FORMULA_C, __FUNCTION__), + g_configManager().getFloat(TRANSCENDANCE_CHANCE_FORMULA_A), + g_configManager().getFloat(TRANSCENDANCE_CHANCE_FORMULA_B), + g_configManager().getFloat(TRANSCENDANCE_CHANCE_FORMULA_C), getTier() ); } @@ -764,7 +764,7 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { } auto tier = getAttribute(ItemAttribute_t::TIER); - if (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__)) { + if (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER)) { g_logger().error("{} - Item {} have a wrong tier {}", __FUNCTION__, getName(), tier); return 0; } @@ -772,7 +772,7 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { return tier; } void setTier(uint8_t tier) { - auto configTier = g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__); + auto configTier = g_configManager().getNumber(FORGE_MAX_ITEM_TIER); if (tier > configTier) { g_logger().error("{} - It is not possible to set a tier higher than {}", __FUNCTION__, configTier); return; diff --git a/src/items/items.cpp b/src/items/items.cpp index bcd055a8db5..43dfeabf2dd 100644 --- a/src/items/items.cpp +++ b/src/items/items.cpp @@ -120,7 +120,7 @@ bool Items::reload() { void Items::loadFromProtobuf() { using namespace Canary::protobuf::appearances; - bool supportAnimation = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__); + bool supportAnimation = g_configManager().getBoolean(OLD_PROTOCOL); for (uint32_t it = 0; it < g_game().m_appearancesPtr->object_size(); ++it) { Appearance object = g_game().m_appearancesPtr->object(it); @@ -236,7 +236,7 @@ void Items::loadFromProtobuf() { bool Items::loadFromXml() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/items/items.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/items/items.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); diff --git a/src/items/items.hpp b/src/items/items.hpp index e56678af6f3..0d6f692d308 100644 --- a/src/items/items.hpp +++ b/src/items/items.hpp @@ -66,7 +66,7 @@ struct Abilities { } uint32_t getHealthGain() const { - return healthGain * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__); + return healthGain * g_configManager().getFloat(RATE_HEALTH_REGEN); } void setHealthTicks(uint32_t value) { @@ -74,7 +74,7 @@ struct Abilities { } uint32_t getHealthTicks() const { - return healthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__); + return healthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED); } void setManaGain(uint32_t value) { @@ -82,7 +82,7 @@ struct Abilities { } uint32_t getManaGain() const { - return manaGain * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__); + return manaGain * g_configManager().getFloat(RATE_MANA_REGEN); } void setManaTicks(uint32_t value) { @@ -90,7 +90,7 @@ struct Abilities { } uint32_t getManaTicks() const { - return manaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__); + return manaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED); } private: diff --git a/src/items/tile.cpp b/src/items/tile.cpp index e9b0b9e8115..40d3ce86a19 100644 --- a/src/items/tile.cpp +++ b/src/items/tile.cpp @@ -390,7 +390,7 @@ void Tile::onAddTileItem(std::shared_ptr item) { spectator->onAddTileItem(static_self_cast(), cylinderMapPos); } - if ((!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES, __FUNCTION__)) + if ((!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES)) && item->isCleanable()) { if (!this->getHouse()) { g_game().addTileToClean(static_self_cast()); @@ -507,7 +507,7 @@ void Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector< spectator->onRemoveTileItem(static_self_cast(), cylinderMapPos, iType, item); } - if (!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES, __FUNCTION__)) { + if (!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES)) { auto items = getItemList(); if (!items || items->empty()) { g_game().removeTileToClean(static_self_cast()); @@ -678,9 +678,9 @@ ReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_ const auto playerTile = player->getTile(); // moving from a pz tile to a non-pz tile if (playerTile && playerTile->hasFlag(TILESTATE_PROTECTIONZONE)) { - auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__); + auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT); if (maxOnline > 1 && player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER && !hasFlag(TILESTATE_PROTECTIONZONE)) { - auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, __FUNCTION__); + auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT); auto accountPlayers = g_game().getPlayersByAccount(player->getAccount()); int countOutsizePZ = 0; for (const auto &accountPlayer : accountPlayers) { diff --git a/src/items/weapons/weapons.cpp b/src/items/weapons/weapons.cpp index 109f0d27218..cce94603a60 100644 --- a/src/items/weapons/weapons.cpp +++ b/src/items/weapons/weapons.cpp @@ -243,7 +243,7 @@ void Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptrdoCombatChain(player, target, params.aggressive); g_logger().debug("Weapon::internalUseWeapon - Chain callback executed."); } else { @@ -284,7 +284,7 @@ void Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr player->addManaSpent(manaCost); player->changeMana(-static_cast(manaCost)); - if (g_configManager().getBoolean(REFUND_BEGINNING_WEAPON_MANA, __FUNCTION__) && (item->getName() == "wand of vortex" || item->getName() == "snakebite rod")) { + if (g_configManager().getBoolean(REFUND_BEGINNING_WEAPON_MANA) && (item->getName() == "wand of vortex" || item->getName() == "snakebite rod")) { player->changeMana(static_cast(manaCost)); } } @@ -298,7 +298,7 @@ void Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr player->changeSoul(-static_cast(soul)); } - bool skipRemoveBeginningWeaponAmmo = !g_configManager().getBoolean(REMOVE_BEGINNING_WEAPON_AMMO, __FUNCTION__) && (item->getName() == "arrow" || item->getName() == "bolt" || item->getName() == "spear"); + bool skipRemoveBeginningWeaponAmmo = !g_configManager().getBoolean(REMOVE_BEGINNING_WEAPON_AMMO) && (item->getName() == "arrow" || item->getName() == "bolt" || item->getName() == "spear"); if (!skipRemoveBeginningWeaponAmmo && breakChance != 0 && uniform_random(1, 100) <= breakChance) { Weapon::decrementItemCount(item); player->updateSupplyTracker(item); @@ -307,14 +307,14 @@ void Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr switch (action) { case WEAPONACTION_REMOVECOUNT: - if (!skipRemoveBeginningWeaponAmmo && g_configManager().getBoolean(REMOVE_WEAPON_AMMO, __FUNCTION__)) { + if (!skipRemoveBeginningWeaponAmmo && g_configManager().getBoolean(REMOVE_WEAPON_AMMO)) { Weapon::decrementItemCount(item); player->updateSupplyTracker(item); } break; case WEAPONACTION_REMOVECHARGE: { - if (uint16_t charges = item->getCharges() != 0 && g_configManager().getBoolean(REMOVE_WEAPON_CHARGES, __FUNCTION__)) { + if (uint16_t charges = item->getCharges() != 0 && g_configManager().getBoolean(REMOVE_WEAPON_CHARGES)) { g_game().transformItem(item, item->getID(), charges - 1); } break; @@ -880,7 +880,7 @@ void WeaponWand::configureWeapon(const ItemType &it) { } int32_t WeaponWand::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr, bool maxDamage /* = false*/) const { - if (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__)) { + if (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM)) { // Returns maximum damage or a random value between minChange and maxChange return maxDamage ? -maxChange : -normal_random(minChange, maxChange); } diff --git a/src/lua/creature/actions.cpp b/src/lua/creature/actions.cpp index 3d9028ce406..c754ffa637c 100644 --- a/src/lua/creature/actions.cpp +++ b/src/lua/creature/actions.cpp @@ -406,14 +406,14 @@ bool Actions::useItem(std::shared_ptr player, const Position &pos, uint8 } if (it.isRune() || it.type == ITEM_TYPE_POTION) { - player->setNextPotionAction(OTSYS_TIME() + g_configManager().getNumber(ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->setNextPotionAction(OTSYS_TIME() + g_configManager().getNumber(ACTIONS_DELAY_INTERVAL)); } else { - player->setNextAction(OTSYS_TIME() + g_configManager().getNumber(ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->setNextAction(OTSYS_TIME() + g_configManager().getNumber(ACTIONS_DELAY_INTERVAL)); } // only send cooldown icon if it's an multi use item if (it.isMultiUse()) { - player->sendUseItemCooldown(g_configManager().getNumber(ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->sendUseItemCooldown(g_configManager().getNumber(ACTIONS_DELAY_INTERVAL)); } return true; } @@ -459,13 +459,13 @@ bool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, } if (it.isRune() || it.type == ITEM_TYPE_POTION) { - player->setNextPotionAction(OTSYS_TIME() + g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->setNextPotionAction(OTSYS_TIME() + g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL)); } else { - player->setNextAction(OTSYS_TIME() + g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->setNextAction(OTSYS_TIME() + g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL)); } if (it.isMultiUse()) { - player->sendUseItemCooldown(g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL, __FUNCTION__)); + player->sendUseItemCooldown(g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL)); } return true; } diff --git a/src/lua/creature/events.cpp b/src/lua/creature/events.cpp index 354a8ac78e8..1f101204164 100644 --- a/src/lua/creature/events.cpp +++ b/src/lua/creature/events.cpp @@ -19,7 +19,7 @@ Events::Events() : bool Events::loadFromXml() { pugi::xml_document doc; - auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/events/events.xml"; + auto folder = g_configManager().getString(CORE_DIRECTORY) + "/events/events.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); @@ -39,7 +39,7 @@ bool Events::loadFromXml() { if (res.second) { const std::string &lowercase = asLowerCaseString(className); const std::string &scriptName = lowercase + ".lua"; - auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + auto coreFolder = g_configManager().getString(CORE_DIRECTORY); if (scriptInterface.loadFile(coreFolder + "/events/scripts/" + scriptName, scriptName) != 0) { g_logger().warn("{} - Can not load script: {}.lua", __FUNCTION__, lowercase); g_logger().warn(scriptInterface.getLastLuaError()); diff --git a/src/lua/creature/raids.cpp b/src/lua/creature/raids.cpp index c801c4cdee4..818ad077e77 100644 --- a/src/lua/creature/raids.cpp +++ b/src/lua/creature/raids.cpp @@ -19,12 +19,12 @@ Raids::Raids() { } bool Raids::loadFromXml() { - if (g_configManager().getBoolean(DISABLE_LEGACY_RAIDS, __FUNCTION__) || isLoaded()) { + if (g_configManager().getBoolean(DISABLE_LEGACY_RAIDS) || isLoaded()) { return true; } pugi::xml_document doc; - auto folder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + "/raids/raids.xml"; + auto folder = g_configManager().getString(DATA_DIRECTORY) + "/raids/raids.xml"; pugi::xml_parse_result result = doc.load_file(folder.c_str()); if (!result) { printXMLError(__FUNCTION__, folder, result); @@ -80,7 +80,7 @@ bool Raids::loadFromXml() { } auto newRaid = std::make_shared(name, interval, margin, repeat); - if (newRaid->loadFromXml(g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + "/raids/" + file)) { + if (newRaid->loadFromXml(g_configManager().getString(DATA_DIRECTORY) + "/raids/" + file)) { raidList.push_back(newRaid); } else { g_logger().error("{} - Failed to load raid: {}", __FUNCTION__, name); @@ -94,7 +94,7 @@ bool Raids::loadFromXml() { static constexpr int32_t MAX_RAND_RANGE = 10000000; bool Raids::startup() { - if (!isLoaded() || isStarted() || g_configManager().getBoolean(DISABLE_LEGACY_RAIDS, __FUNCTION__)) { + if (!isLoaded() || isStarted() || g_configManager().getBoolean(DISABLE_LEGACY_RAIDS)) { return false; } @@ -109,7 +109,7 @@ bool Raids::startup() { } void Raids::checkRaids() { - if (g_configManager().getBoolean(DISABLE_LEGACY_RAIDS, __FUNCTION__)) { + if (g_configManager().getBoolean(DISABLE_LEGACY_RAIDS)) { return; } if (!getRunning()) { @@ -575,7 +575,7 @@ bool ScriptEvent::configureRaidEvent(const pugi::xml_node &eventNode) { std::string scriptName = std::string(scriptAttribute.as_string()); - if (!loadScript(g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + "/raids/scripts/" + scriptName, scriptName)) { + if (!loadScript(g_configManager().getString(DATA_DIRECTORY) + "/raids/scripts/" + scriptName, scriptName)) { g_logger().error("[{}] can not load raid script: {}", __FUNCTION__, scriptName); return false; } diff --git a/src/lua/functions/core/game/config_functions.cpp b/src/lua/functions/core/game/config_functions.cpp index acd4e8c0c1c..7b4b34a9eb3 100644 --- a/src/lua/functions/core/game/config_functions.cpp +++ b/src/lua/functions/core/game/config_functions.cpp @@ -41,7 +41,7 @@ int ConfigFunctions::luaConfigManagerGetString(lua_State* L) { return 1; } - pushString(L, g_configManager().getString(getNumber(L, -1), __FUNCTION__)); + pushString(L, g_configManager().getString(getNumber(L, -1))); return 1; } @@ -52,7 +52,7 @@ int ConfigFunctions::luaConfigManagerGetNumber(lua_State* L) { return 1; } - lua_pushnumber(L, g_configManager().getNumber(getNumber(L, -1), __FUNCTION__)); + lua_pushnumber(L, g_configManager().getNumber(getNumber(L, -1))); return 1; } @@ -63,7 +63,7 @@ int ConfigFunctions::luaConfigManagerGetBoolean(lua_State* L) { return 1; } - pushBoolean(L, g_configManager().getBoolean(getNumber(L, -1), __FUNCTION__)); + pushBoolean(L, g_configManager().getBoolean(getNumber(L, -1))); return 1; } @@ -79,7 +79,7 @@ int ConfigFunctions::luaConfigManagerGetFloat(lua_State* L) { // Check if the second argument (shouldRound) is provided and is a boolean; default to true if not provided bool shouldRound = getBoolean(L, 2, true); - float value = g_configManager().getFloat(key, __FUNCTION__); + float value = g_configManager().getFloat(key); double finalValue = shouldRound ? static_cast(std::round(value * 100.0) / 100.0) : value; g_logger().debug("[{}] key: {}, finalValue: {}, shouldRound: {}", __METHOD_NAME__, magic_enum::enum_name(key), finalValue, shouldRound); diff --git a/src/lua/functions/core/game/global_functions.cpp b/src/lua/functions/core/game/global_functions.cpp index 79cb3d398fa..958c6deb881 100644 --- a/src/lua/functions/core/game/global_functions.cpp +++ b/src/lua/functions/core/game/global_functions.cpp @@ -574,7 +574,7 @@ int GlobalFunctions::luaAddEvent(lua_State* L) { return 1; } - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) || g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS, __FUNCTION__)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) || g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS)) { std::vector> indexes; for (int i = 3; i <= parameters; ++i) { if (lua_getmetatable(globalState, i) == 0) { @@ -590,7 +590,7 @@ int GlobalFunctions::luaAddEvent(lua_State* L) { } if (!indexes.empty()) { - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS)) { bool plural = indexes.size() > 1; std::string warningString = "Argument"; @@ -619,7 +619,7 @@ int GlobalFunctions::luaAddEvent(lua_State* L) { reportErrorFunc(warningString); } - if (g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS, __FUNCTION__)) { + if (g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS)) { for (const auto &entry : indexes) { switch (entry.second) { case LuaData_t::Item: diff --git a/src/lua/functions/creatures/creature_functions.cpp b/src/lua/functions/creatures/creature_functions.cpp index 4d4a4202903..83549818581 100644 --- a/src/lua/functions/creatures/creature_functions.cpp +++ b/src/lua/functions/creatures/creature_functions.cpp @@ -641,7 +641,7 @@ int CreatureFunctions::luaCreatureSetOutfit(lua_State* L) { std::shared_ptr creature = getUserdataShared(L, 1); if (creature) { Outfit_t outfit = getOutfit(L, 2); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { g_logger().warn("[CreatureFunctions::luaCreatureSetOutfit] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", outfit.lookType); return 1; } diff --git a/src/lua/functions/creatures/monster/monster_functions.cpp b/src/lua/functions/creatures/monster/monster_functions.cpp index e7b22842640..cddbca49830 100644 --- a/src/lua/functions/creatures/monster/monster_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_functions.cpp @@ -369,7 +369,7 @@ int MonsterFunctions::luaMonsterSetSpawnPosition(lua_State* L) { monster->setMasterPos(pos); SpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5); - uint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule)); + uint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN) * eventschedule)); spawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval)); spawnMonster.startSpawnMonsterCheck(); diff --git a/src/lua/functions/creatures/monster/monster_type_functions.cpp b/src/lua/functions/creatures/monster/monster_type_functions.cpp index f4d524a533c..1881e98653c 100644 --- a/src/lua/functions/creatures/monster/monster_type_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_type_functions.cpp @@ -1191,7 +1191,7 @@ int MonsterTypeFunctions::luaMonsterTypeOutfit(lua_State* L) { pushOutfit(L, monsterType->info.outfit); } else { Outfit_t outfit = getOutfit(L, 2); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { g_logger().warn("[MonsterTypeFunctions::luaMonsterTypeOutfit] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", outfit.lookType); lua_pushnil(L); } else { diff --git a/src/lua/functions/creatures/npc/npc_type_functions.cpp b/src/lua/functions/creatures/npc/npc_type_functions.cpp index 8084688deea..2c4123d91db 100644 --- a/src/lua/functions/creatures/npc/npc_type_functions.cpp +++ b/src/lua/functions/creatures/npc/npc_type_functions.cpp @@ -306,7 +306,7 @@ int NpcTypeFunctions::luaNpcTypeOutfit(lua_State* L) { pushOutfit(L, npcType->info.outfit); } else { Outfit_t outfit = getOutfit(L, 2); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && outfit.lookType != 0 && !g_game().isLookTypeRegistered(outfit.lookType)) { g_logger().warn("[NpcTypeFunctions::luaNpcTypeOutfit] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.", outfit.lookType); lua_pushnil(L); } else { diff --git a/src/lua/functions/map/house_functions.cpp b/src/lua/functions/map/house_functions.cpp index b13e47eae10..597eec3975e 100644 --- a/src/lua/functions/map/house_functions.cpp +++ b/src/lua/functions/map/house_functions.cpp @@ -125,7 +125,7 @@ int HouseFunctions::luaHouseSetNewOwnerGuid(lua_State* L) { // house:setNewOwnerGuid(guid[, updateDatabase = true]) auto house = getUserdataShared(L, 1); if (house) { - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); if (isTransferOnRestart && house->hasNewOwnership()) { const auto player = g_game().getPlayerByGUID(house->getOwner()); if (player) { @@ -166,7 +166,7 @@ int HouseFunctions::luaHouseHasNewOwnership(lua_State* L) { return 1; } - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); pushBoolean(L, isTransferOnRestart && house->hasNewOwnership()); return 1; } @@ -208,7 +208,7 @@ int HouseFunctions::luaHouseStartTrade(lua_State* L) { return 1; } - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); if (isTransferOnRestart && house->hasNewOwnership()) { tradePartner->sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot buy this house. Ownership is already scheduled to be transferred upon the next server restart."); player->sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot sell this house. Ownership is already scheduled to be transferred upon the next server restart."); diff --git a/src/lua/functions/map/position_functions.cpp b/src/lua/functions/map/position_functions.cpp index b9f5b5947f6..06dc2219965 100644 --- a/src/lua/functions/map/position_functions.cpp +++ b/src/lua/functions/map/position_functions.cpp @@ -158,7 +158,7 @@ int PositionFunctions::luaPositionSendMagicEffect(lua_State* L) { } MagicEffectClasses magicEffect = getNumber(L, 2); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && !g_game().isMagicEffectRegistered(magicEffect)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && !g_game().isMagicEffectRegistered(magicEffect)) { g_logger().warn("[PositionFunctions::luaPositionSendMagicEffect] An unregistered magic effect type with id '{}' was blocked to prevent client crash.", fmt::underlying(magicEffect)); pushBoolean(L, false); return 1; @@ -189,7 +189,7 @@ int PositionFunctions::luaPositionRemoveMagicEffect(lua_State* L) { } MagicEffectClasses magicEffect = getNumber(L, 2); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && !g_game().isMagicEffectRegistered(magicEffect)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && !g_game().isMagicEffectRegistered(magicEffect)) { g_logger().warn("[PositionFunctions::luaPositionRemoveMagicEffect] An unregistered magic effect type with id '{}' was blocked to prevent client crash.", fmt::underlying(magicEffect)); pushBoolean(L, false); return 1; @@ -222,7 +222,7 @@ int PositionFunctions::luaPositionSendDistanceEffect(lua_State* L) { ShootType_t distanceEffect = getNumber(L, 3); const Position &positionEx = getPosition(L, 2); const Position &position = getPosition(L, 1); - if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && !g_game().isDistanceEffectRegistered(distanceEffect)) { + if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) && !g_game().isDistanceEffectRegistered(distanceEffect)) { g_logger().warn("[PositionFunctions::luaPositionSendDistanceEffect] An unregistered distance effect type with id '{}' was blocked to prevent client crash.", fmt::underlying(distanceEffect)); return 1; } diff --git a/src/lua/global/baseevents.cpp b/src/lua/global/baseevents.cpp index e4f4dfa05a5..78c1195ab28 100644 --- a/src/lua/global/baseevents.cpp +++ b/src/lua/global/baseevents.cpp @@ -18,7 +18,7 @@ bool BaseEvents::loadFromXml() { } std::string scriptsName = getScriptBaseName(); - std::string basePath = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/" + scriptsName + "/"; + std::string basePath = g_configManager().getString(CORE_DIRECTORY) + "/" + scriptsName + "/"; if (getScriptInterface().loadFile( basePath + "lib/" + scriptsName + ".lua", scriptsName + ".lua" diff --git a/src/lua/scripts/scripts.cpp b/src/lua/scripts/scripts.cpp index 3a35750c1af..6e2add673d8 100644 --- a/src/lua/scripts/scripts.cpp +++ b/src/lua/scripts/scripts.cpp @@ -33,7 +33,7 @@ void Scripts::clearAllScripts() const { } bool Scripts::loadEventSchedulerScripts(const std::string &fileName) { - auto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__); + auto coreFolder = g_configManager().getString(CORE_DIRECTORY); const auto dir = std::filesystem::current_path() / coreFolder / "events" / "scripts" / "scheduler"; if (!std::filesystem::exists(dir) || !std::filesystem::is_directory(dir)) { g_logger().warn("{} - Can not load folder 'scheduler' on {}/events/scripts'", __FUNCTION__, coreFolder); @@ -88,7 +88,7 @@ bool Scripts::loadScripts(std::string loadPath, bool isLib, bool reload) { if (std::string disable("#"); file.front() == disable.front()) { // Send log of disabled script - if (g_configManager().getBoolean(SCRIPTS_CONSOLE_LOGS, __FUNCTION__)) { + if (g_configManager().getBoolean(SCRIPTS_CONSOLE_LOGS)) { g_logger().info("[script]: {} [disabled]", realPath.filename().string()); } // Skip for next loop and ignore disabled file @@ -98,7 +98,7 @@ bool Scripts::loadScripts(std::string loadPath, bool isLib, bool reload) { // If the file is a library file or if the file's parent directory is not "lib" or "events" if (isLib || (fileFolderView != "lib" && fileFolderView != "events")) { // If console logs are enabled and the file is not a library file - if (g_configManager().getBoolean(SCRIPTS_CONSOLE_LOGS, __FUNCTION__)) { + if (g_configManager().getBoolean(SCRIPTS_CONSOLE_LOGS)) { // If the current directory is different from the last directory that was logged if (lastDirectory.empty() || lastDirectory != scriptFolderView) { // Update the last directory variable and log the directory name @@ -116,7 +116,7 @@ bool Scripts::loadScripts(std::string loadPath, bool isLib, bool reload) { } } - if (g_configManager().getBoolean(SCRIPTS_CONSOLE_LOGS, __FUNCTION__)) { + if (g_configManager().getBoolean(SCRIPTS_CONSOLE_LOGS)) { if (!reload) { g_logger().info("[script loaded]: {}", realPath.filename().string()); } else { diff --git a/src/map/house/house.cpp b/src/map/house/house.cpp index ba5e782e5de..9995862c679 100644 --- a/src/map/house/house.cpp +++ b/src/map/house/house.cpp @@ -25,7 +25,7 @@ void House::addTile(std::shared_ptr tile) { } void House::setNewOwnerGuid(int32_t newOwnerGuid, bool serverStartup) { - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); if (!isTransferOnRestart) { setOwner(newOwnerGuid, true); return; @@ -103,7 +103,7 @@ void House::setOwner(uint32_t guid, bool updateDatabase /* = true*/, std::shared if (owner != 0) { tryTransferOwnership(std::move(player), false); } else { - std::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD, __FUNCTION__)); + std::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD)); time_t currentTime = time(nullptr); if (strRentPeriod == "yearly") { currentTime += 24 * 60 * 60 * 365; @@ -153,10 +153,10 @@ void House::updateDoorDescription() const { ss << " It is " << getSize() << " square meters."; const int32_t housePrice = getPrice(); if (housePrice != -1) { - if (g_configManager().getBoolean(HOUSE_PURSHASED_SHOW_PRICE, __FUNCTION__) || owner == 0) { + if (g_configManager().getBoolean(HOUSE_PURSHASED_SHOW_PRICE) || owner == 0) { ss << " It costs " << formatNumber(getPrice()) << " gold coins."; } - std::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD, __FUNCTION__)); + std::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD)); if (strRentPeriod != "never") { ss << " The rent cost is " << formatNumber(getRent()) << " gold coins and it is billed " << strRentPeriod << "."; } @@ -172,7 +172,7 @@ AccessHouseLevel_t House::getHouseAccessLevel(std::shared_ptr player) co return HOUSE_OWNER; } - if (g_configManager().getBoolean(HOUSE_OWNED_BY_ACCOUNT, __FUNCTION__)) { + if (g_configManager().getBoolean(HOUSE_OWNED_BY_ACCOUNT)) { if (ownerAccountId == player->getAccountId()) { return HOUSE_OWNER; } @@ -487,7 +487,7 @@ std::shared_ptr HouseTransferItem::createHouseTransferItem(st void HouseTransferItem::onTradeEvent(TradeEvents_t event, std::shared_ptr owner) { if (event == ON_TRADE_TRANSFER) { if (house) { - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); auto ownershipTransferMessage = " The ownership will be transferred upon server restart."; auto boughtMessage = fmt::format("You have successfully bought the house.{}", isTransferOnRestart ? ownershipTransferMessage : ""); auto soldMessage = fmt::format("You have successfully sold your house.{}", isTransferOnRestart ? ownershipTransferMessage : ""); @@ -514,7 +514,7 @@ bool House::executeTransfer(std::shared_ptr item, std::shared return false; } - auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__); + auto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART); if (isTransferOnRestart) { if (hasNewOwnerOnStartup) { return false; @@ -797,10 +797,10 @@ void Houses::payHouses(RentPeriod_t rentPeriod) const { } // Player hasn't logged in for a while, reset house owner - auto daysToReset = g_configManager().getNumber(HOUSE_LOSE_AFTER_INACTIVITY, __FUNCTION__); + auto daysToReset = g_configManager().getNumber(HOUSE_LOSE_AFTER_INACTIVITY); if (daysToReset > 0) { auto daysSinceLastLogin = (currentTime - player->getLastLoginSaved()) / (60 * 60 * 24); - bool vipKeep = g_configManager().getBoolean(VIP_KEEP_HOUSE, __FUNCTION__) && player->isVip(); + bool vipKeep = g_configManager().getBoolean(VIP_KEEP_HOUSE) && player->isVip(); bool activityKeep = daysSinceLastLogin < daysToReset; if (vipKeep && !activityKeep) { g_logger().info("Player {} has not logged in for {} days, but is a VIP, so the house will not be reset.", player->getName(), daysToReset); @@ -883,11 +883,11 @@ void Houses::payHouses(RentPeriod_t rentPeriod) const { } uint32_t House::getRent() const { - return static_cast(g_configManager().getFloat(HOUSE_RENT_RATE, __FUNCTION__) * static_cast(rent)); + return static_cast(g_configManager().getFloat(HOUSE_RENT_RATE) * static_cast(rent)); } uint32_t House::getPrice() const { - auto sqmPrice = static_cast(g_configManager().getNumber(HOUSE_PRICE_PER_SQM, __FUNCTION__)) * getSize(); - auto rentPrice = static_cast(static_cast(getRent()) * g_configManager().getFloat(HOUSE_PRICE_RENT_MULTIPLIER, __FUNCTION__)); + auto sqmPrice = static_cast(g_configManager().getNumber(HOUSE_PRICE_PER_SQM)) * getSize(); + auto rentPrice = static_cast(static_cast(getRent()) * g_configManager().getFloat(HOUSE_PRICE_RENT_MULTIPLIER)); return sqmPrice + rentPrice; } diff --git a/src/map/house/housetile.cpp b/src/map/house/housetile.cpp index 8a3217cc011..d43be459ee2 100644 --- a/src/map/house/housetile.cpp +++ b/src/map/house/housetile.cpp @@ -78,7 +78,7 @@ ReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thi } } else if (thing->getItem() && actor) { std::shared_ptr actorPlayer = actor->getPlayer(); - if (house && (!house->isInvited(actorPlayer) || house->getHouseAccessLevel(actorPlayer) == HOUSE_GUEST) && g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__)) { + if (house && (!house->isInvited(actorPlayer) || house->getHouseAccessLevel(actorPlayer) == HOUSE_GUEST) && g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS)) { return RETURNVALUE_CANNOTTHROW; } } @@ -118,7 +118,7 @@ ReturnValue HouseTile::queryRemove(const std::shared_ptr &thing, uint32_t return RETURNVALUE_NOTPOSSIBLE; } - if (actor && g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__)) { + if (actor && g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS)) { std::shared_ptr actorPlayer = actor->getPlayer(); if (house && !house->isInvited(actorPlayer)) { return RETURNVALUE_NOTPOSSIBLE; diff --git a/src/map/map.cpp b/src/map/map.cpp index ce73464b80c..155bdce347d 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -31,14 +31,14 @@ void Map::load(const std::string &identifier, const Position &pos) { void Map::loadMap(const std::string &identifier, bool mainMap /*= false*/, bool loadHouses /*= false*/, bool loadMonsters /*= false*/, bool loadNpcs /*= false*/, bool loadZones /*= false*/, const Position &pos /*= Position()*/) { // Only download map if is loading the main map and it is not already downloaded - if (mainMap && g_configManager().getBoolean(TOGGLE_DOWNLOAD_MAP, __FUNCTION__) && !std::filesystem::exists(identifier)) { - const auto mapDownloadUrl = g_configManager().getString(MAP_DOWNLOAD_URL, __FUNCTION__); + if (mainMap && g_configManager().getBoolean(TOGGLE_DOWNLOAD_MAP) && !std::filesystem::exists(identifier)) { + const auto mapDownloadUrl = g_configManager().getString(MAP_DOWNLOAD_URL); if (mapDownloadUrl.empty()) { g_logger().warn("Map download URL in config.lua is empty, download disabled"); } if (CURL* curl = curl_easy_init(); curl && !mapDownloadUrl.empty()) { - g_logger().info("Downloading " + g_configManager().getString(MAP_NAME, __FUNCTION__) + ".otbm to world folder"); + g_logger().info("Downloading " + g_configManager().getString(MAP_NAME) + ".otbm to world folder"); FILE* otbm = fopen(identifier.c_str(), "wb"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_URL, mapDownloadUrl.c_str()); @@ -73,7 +73,7 @@ void Map::loadMap(const std::string &identifier, bool mainMap /*= false*/, bool * If map custom is enabled, then it is load in loadMapCustom function * NOTE: This will ensure that the information is not duplicated */ - if (!g_configManager().getBoolean(TOGGLE_MAP_CUSTOM, __FUNCTION__)) { + if (!g_configManager().getBoolean(TOGGLE_MAP_CUSTOM)) { IOMapSerialize::loadHouseInfo(); IOMapSerialize::loadHouseItems(this); } @@ -88,7 +88,7 @@ void Map::loadMap(const std::string &identifier, bool mainMap /*= false*/, bool } // Files need to be cleaned up if custom map is enabled to open, or will try to load main map files - if (g_configManager().getBoolean(TOGGLE_MAP_CUSTOM, __FUNCTION__)) { + if (g_configManager().getBoolean(TOGGLE_MAP_CUSTOM)) { monsterfile.clear(); housefile.clear(); npcfile.clear(); @@ -101,7 +101,7 @@ void Map::loadMap(const std::string &identifier, bool mainMap /*= false*/, bool void Map::loadMapCustom(const std::string &mapName, bool loadHouses, bool loadMonsters, bool loadNpcs, bool loadZones, int customMapIndex) { // Load the map - load(g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + "/world/custom/" + mapName + ".otbm"); + load(g_configManager().getString(DATA_DIRECTORY) + "/world/custom/" + mapName + ".otbm"); if (loadMonsters && !IOMap::loadMonstersCustom(this, mapName, customMapIndex)) { g_logger().warn("Failed to load monster custom data"); diff --git a/src/security/argon.cpp b/src/security/argon.cpp index 33caaef3efc..1bed157e418 100644 --- a/src/security/argon.cpp +++ b/src/security/argon.cpp @@ -18,10 +18,10 @@ Argon2::Argon2() { } void Argon2::updateConstants() { - m_const_str = g_configManager().getString(M_CONST, __FUNCTION__); + m_const_str = g_configManager().getString(M_CONST); m_cost = parseBitShift(m_const_str); - t_cost = g_configManager().getNumber(T_CONST, __FUNCTION__); - parallelism = g_configManager().getNumber(PARALLELISM, __FUNCTION__); + t_cost = g_configManager().getNumber(T_CONST); + parallelism = g_configManager().getNumber(PARALLELISM); } uint32_t Argon2::parseBitShift(const std::string &bitShiftStr) const { diff --git a/src/server/network/connection/connection.cpp b/src/server/network/connection/connection.cpp index b5ebdebc648..91f62a7602d 100644 --- a/src/server/network/connection/connection.cpp +++ b/src/server/network/connection/connection.cpp @@ -140,7 +140,7 @@ void Connection::parseProxyIdentification(const std::error_code &error) { uint8_t* msgBuffer = m_msg.getBuffer(); auto charData = static_cast(static_cast(msgBuffer)); - std::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + "\n"; + std::string serverName = g_configManager().getString(SERVER_NAME) + "\n"; if (connectionState == CONNECTION_STATE_IDENTIFYING) { if (msgBuffer[1] == 0x00 || strncasecmp(charData, &serverName[0], 2) != 0) { // Probably not proxy identification so let's try standard parsing method @@ -195,7 +195,7 @@ void Connection::parseHeader(const std::error_code &error) { } uint32_t timePassed = std::max(1, (time(nullptr) - timeConnected) + 1); - if ((++packetsSent / timePassed) > static_cast(g_configManager().getNumber(MAX_PACKETS_PER_SECOND, __FUNCTION__))) { + if ((++packetsSent / timePassed) > static_cast(g_configManager().getNumber(MAX_PACKETS_PER_SECOND))) { g_logger().warn("[Connection::parseHeader] - {} disconnected for exceeding packet per second limit.", convertIPToString(getIP())); close(); return; diff --git a/src/server/network/protocol/protocol.cpp b/src/server/network/protocol/protocol.cpp index ce3d1339648..ca39107fe55 100644 --- a/src/server/network/protocol/protocol.cpp +++ b/src/server/network/protocol/protocol.cpp @@ -265,7 +265,7 @@ bool Protocol::compression(OutputMessage &outputMessage) const { } Protocol::ZStream::ZStream() noexcept { - const int32_t compressionLevel = g_configManager().getNumber(COMPRESSION_LEVEL, __FUNCTION__); + const int32_t compressionLevel = g_configManager().getNumber(COMPRESSION_LEVEL); if (compressionLevel <= 0) { return; } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 81de8325cac..7ba07d13e4d 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -205,7 +205,7 @@ namespace { for (size_t i = 0; i < COMBAT_COUNT; ++i) { damageModifiers[i] -= 100 * player->getAbsorbPercent(indexToCombatType(i)); - if (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) { + if (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM)) { damageModifiers[i] -= player->wheel()->getResistance(indexToCombatType(i)); } @@ -511,7 +511,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS if (g_game().getGameState() == GAME_STATE_CLOSED && !player->hasFlag(PlayerFlags_t::CanAlwaysLogin)) { g_game().removePlayerUniqueLogin(player); - auto maintainMessage = g_configManager().getString(MAINTAIN_MODE_MESSAGE, __FUNCTION__); + auto maintainMessage = g_configManager().getString(MAINTAIN_MODE_MESSAGE); if (!maintainMessage.empty()) { disconnectClient(maintainMessage); } else { @@ -520,14 +520,14 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS return; } - if (g_configManager().getBoolean(ONLY_PREMIUM_ACCOUNT, __FUNCTION__) && !player->isPremium() && (player->getGroup()->id < GROUP_TYPE_GAMEMASTER || player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER)) { + if (g_configManager().getBoolean(ONLY_PREMIUM_ACCOUNT) && !player->isPremium() && (player->getGroup()->id < GROUP_TYPE_GAMEMASTER || player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER)) { g_game().removePlayerUniqueLogin(player); disconnectClient("Your premium time for this account is out.\n\nTo play please buy additional premium time from our website"); return; } auto onlineCount = g_game().getPlayersByAccount(player->getAccount()).size(); - auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__); + auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT); if (player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER && onlineCount >= maxOnline) { g_game().removePlayerUniqueLogin(player); disconnectClient(fmt::format("You may only login with {} character{}\nof your account at the same time.", maxOnline, maxOnline > 1 ? "s" : "")); @@ -586,7 +586,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS const auto tile = g_game().map.getOrCreateTile(player->getLoginPosition()); // moving from a pz tile to a non-pz tile if (maxOnline > 1 && player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER && !tile->hasFlag(TILESTATE_PROTECTIONZONE)) { - auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, __FUNCTION__); + auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT); auto accountPlayers = g_game().getPlayersByAccount(player->getAccount()); int countOutsizePZ = 0; for (const auto &accountPlayer : accountPlayers) { @@ -612,7 +612,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS player->lastLoginSaved = std::max(time(nullptr), player->lastLoginSaved + 1); acceptPackets = true; } else { - if (eventConnect != 0 || !g_configManager().getBoolean(REPLACE_KICK_ON_LOGIN, __FUNCTION__)) { + if (eventConnect != 0 || !g_configManager().getBoolean(REPLACE_KICK_ON_LOGIN)) { // Already trying to connect disconnectClient("You are already logged in."); return; @@ -710,7 +710,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { g_logger().trace("Protocol version: {}", version); // Old protocol support - oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && version <= 1100; + oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL) && version <= 1100; if (oldProtocol) { setChecksumMethod(CHECKSUM_METHOD_ADLER32); @@ -750,7 +750,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { 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::string authType = g_configManager().getString(AUTH_TYPE); std::ostringstream ss; std::string sessionKey = msg.getString(); std::string accountDescriptor = sessionKey; @@ -807,7 +807,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { if (!oldProtocol && clientVersion != CLIENT_VERSION) { ss.str(std::string()); ss << "Only clients with protocol " << CLIENT_VERSION_UPPER << "." << CLIENT_VERSION_LOWER; - if (g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__)) { + if (g_configManager().getBoolean(OLD_PROTOCOL)) { ss << " or 11.00"; } ss << " allowed!"; @@ -2176,7 +2176,7 @@ void ProtocolGame::parseTaskHuntingAction(NetworkMessage &msg) { bool upgrade = msg.getByte() != 0; uint16_t raceId = msg.get(); - if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(TASK_HUNTING_ENABLED)) { return; } @@ -2204,7 +2204,7 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.addByte(0x00); // All data available msg.addByte(1); // Worlds - auto serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__); + auto serverName = g_configManager().getString(SERVER_NAME); msg.addString(serverName); // First World msg.addString(serverName); // Selected World @@ -2413,10 +2413,10 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { break; } - newmsg.add(g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true ? loot.id : 0); + newmsg.add(g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY) || shouldAddItem == true ? loot.id : 0); newmsg.addByte(difficult); newmsg.addByte(0); // 1 if special event - 0 if regular loot (?) - if (g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true) { + if (g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY) || shouldAddItem == true) { newmsg.addString(loot.name); newmsg.addByte(loot.countmax > 0 ? 0x1 : 0x0); } @@ -3056,7 +3056,7 @@ void ProtocolGame::parsePreyAction(NetworkMessage &msg) { raceId = msg.get(); } - if (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(PREY_ENABLED)) { return; } @@ -3178,12 +3178,12 @@ void ProtocolGame::parseRewardChestCollect(NetworkMessage &msg) { auto stackPosition = msg.getByte(); // Block collect reward - auto useCollect = g_configManager().getBoolean(REWARD_CHEST_COLLECT_ENABLED, __FUNCTION__); + auto useCollect = g_configManager().getBoolean(REWARD_CHEST_COLLECT_ENABLED); if (!useCollect) { return; } - auto maxCollectItems = g_configManager().getNumber(REWARD_CHEST_MAX_COLLECT_ITEMS, __FUNCTION__); + auto maxCollectItems = g_configManager().getNumber(REWARD_CHEST_MAX_COLLECT_ITEMS); g_game().playerRewardChestCollect(player->getID(), position, itemId, stackPosition, maxCollectItems); } @@ -3646,7 +3646,7 @@ void ProtocolGame::sendCyclopediaCharacterCombatStats() { msg.add(player->getArmor()); msg.add(player->getDefense()); // Wheel of destiny mitigation - if (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) { + if (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM)) { msg.addDouble(player->getMitigation()); } else { msg.addDouble(0); @@ -4360,7 +4360,7 @@ void ProtocolGame::sendBlessStatus() { if (oldProtocol) { msg.add(blessCount >= 5 ? 0x01 : 0x00); } else { - bool glow = player->getVocationId() > VOCATION_NONE && ((g_configManager().getBoolean(INVENTORY_GLOW, __FUNCTION__) && blessCount >= 5) || player->getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__)); + bool glow = player->getVocationId() > VOCATION_NONE && ((g_configManager().getBoolean(INVENTORY_GLOW) && blessCount >= 5) || player->getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL)); msg.add(glow ? 1 : 0); // Show up the glowing effect in items if you have all blesses or adventurer's blessing msg.addByte((blessCount >= 7) ? 3 : ((blessCount >= 5) ? 2 : 1)); // 1 = Disabled | 2 = normal | 3 = green } @@ -4369,7 +4369,7 @@ void ProtocolGame::sendBlessStatus() { } void ProtocolGame::sendPremiumTrigger() { - if (!g_configManager().getBoolean(FREE_PREMIUM, __FUNCTION__) && !g_configManager().getBoolean(VIP_SYSTEM_ENABLED, __FUNCTION__)) { + if (!g_configManager().getBoolean(FREE_PREMIUM) && !g_configManager().getBoolean(VIP_SYSTEM_ENABLED)) { NetworkMessage msg; msg.addByte(0x9E); msg.addByte(16); @@ -5319,31 +5319,31 @@ void ProtocolGame::sendForgingData() { } // (conversion) (left column top) Cost to make 1 bottom item - 20 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_COST_ONE_SLIVER, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_COST_ONE_SLIVER))); // (conversion) (left column bottom) How many items to make - 3 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_SLIVER_AMOUNT, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_SLIVER_AMOUNT))); // (conversion) (middle column top) Cost to make 1 - 50 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_CORE_COST, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_CORE_COST))); // (conversion) (right column top) Current stored dust limit minus this number = cost to increase stored dust limit - 75 msg.addByte(75); // (conversion) (right column bottom) Starting stored dust limit msg.add(player->getForgeDustLevel()); // (conversion) (right column bottom) Max stored dust limit - 325 - msg.add(g_configManager().getNumber(FORGE_MAX_DUST, __FUNCTION__)); + msg.add(g_configManager().getNumber(FORGE_MAX_DUST)); // (normal fusion) dust cost - 100 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_FUSION_DUST_COST, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_FUSION_DUST_COST))); // (convergence fusion) dust cost - 130 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_CONVERGENCE_FUSION_DUST_COST, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_CONVERGENCE_FUSION_DUST_COST))); // (normal transfer) dust cost - 100 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_TRANSFER_DUST_COST, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_TRANSFER_DUST_COST))); // (convergence transfer) dust cost - 160 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_CONVERGENCE_TRANSFER_DUST_COST, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_CONVERGENCE_TRANSFER_DUST_COST))); // (fusion) Base success rate - 50 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_BASE_SUCCESS_RATE, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_BASE_SUCCESS_RATE))); // (fusion) Bonus success rate - 15 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_BONUS_SUCCESS_RATE, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_BONUS_SUCCESS_RATE))); // (fusion) Tier loss chance after reduction - 50 - msg.addByte(static_cast(g_configManager().getNumber(FORGE_TIER_LOSS_REDUCTION, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(FORGE_TIER_LOSS_REDUCTION))); // Update player resources parseSendResourceBalance(); @@ -5359,7 +5359,7 @@ void ProtocolGame::sendOpenForge() { std::map> donorTierItemMap; std::map> receiveTierItemMap; - auto maxConfigTier = g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__); + auto maxConfigTier = g_configManager().getNumber(FORGE_MAX_ITEM_TIER); /* *Start - Parsing items informations @@ -6732,8 +6732,8 @@ void ProtocolGame::sendAddCreature(std::shared_ptr creature, const Pos msg.addByte(0x00); // can change pvp framing option msg.addByte(0x00); // expert mode button enabled - msg.addString(g_configManager().getString(STORE_IMAGES_URL, __FUNCTION__)); - msg.add(static_cast(g_configManager().getNumber(STORE_COIN_PACKET, __FUNCTION__))); + msg.addString(g_configManager().getString(STORE_IMAGES_URL)); + msg.add(static_cast(g_configManager().getNumber(STORE_COIN_PACKET))); if (!oldProtocol) { msg.addByte(shouldAddExivaRestrictions ? 0x01 : 0x00); // exiva button enabled @@ -6817,7 +6817,7 @@ void ProtocolGame::sendAddCreature(std::shared_ptr creature, const Pos sendLootContainers(); sendBasicData(); // Wheel of destiny cooldown - if (!oldProtocol && g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) { + if (!oldProtocol && g_configManager().getBoolean(TOGGLE_WHEELSYSTEM)) { player->wheel()->sendGiftOfLifeCooldown(); } @@ -7101,7 +7101,7 @@ void ProtocolGame::sendOutfitWindow() { uint16_t outfitSize = 0; msg.skipBytes(2); - if (player->isAccessPlayer() && g_configManager().getBoolean(ENABLE_SUPPORT_OUTFIT, __FUNCTION__)) { + if (player->isAccessPlayer() && g_configManager().getBoolean(ENABLE_SUPPORT_OUTFIT)) { msg.add(75); msg.addString("Gamemaster"); msg.addByte(0); @@ -7569,12 +7569,12 @@ void ProtocolGame::sendPreyPrices() { msg.addByte(0xE9); msg.add(player->getPreyRerollPrice()); if (!oldProtocol) { - msg.addByte(static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE, __FUNCTION__))); - msg.addByte(static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE))); + msg.addByte(static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE))); msg.add(player->getTaskHuntingRerollPrice()); msg.add(player->getTaskHuntingRerollPrice()); - msg.addByte(static_cast(g_configManager().getNumber(TASK_HUNTING_SELECTION_LIST_PRICE, __FUNCTION__))); - msg.addByte(static_cast(g_configManager().getNumber(TASK_HUNTING_BONUS_REROLL_PRICE, __FUNCTION__))); + msg.addByte(static_cast(g_configManager().getNumber(TASK_HUNTING_SELECTION_LIST_PRICE))); + msg.addByte(static_cast(g_configManager().getNumber(TASK_HUNTING_BONUS_REROLL_PRICE))); } writeToOutputBuffer(msg); @@ -8491,7 +8491,7 @@ void ProtocolGame::sendOpenStash() { msg.add(item.first); msg.add(item.second); } - msg.add(static_cast(g_configManager().getNumber(STASH_ITEMS, __FUNCTION__) - getStashSize(list))); + msg.add(static_cast(g_configManager().getNumber(STASH_ITEMS) - getStashSize(list))); writeToOutputBuffer(msg); } @@ -8912,14 +8912,14 @@ void ProtocolGame::parseSendBosstiarySlots() { bossesUnlockedSize--; } - bool isTodaySlotUnlocked = g_configManager().getBoolean(BOOSTED_BOSS_SLOT, __FUNCTION__); + bool isTodaySlotUnlocked = g_configManager().getBoolean(BOOSTED_BOSS_SLOT); msg.addByte(isTodaySlotUnlocked ? 1 : 0); msg.add(boostedBossId); if (isTodaySlotUnlocked && boostedBossId != 0) { auto boostedBossKillCount = player->getBestiaryKillCount(static_cast(boostedBossId)); - auto boostedLootBonus = static_cast(g_configManager().getNumber(BOOSTED_BOSS_LOOT_BONUS, __FUNCTION__)); - auto bosstiaryMultiplier = static_cast(g_configManager().getNumber(BOSSTIARY_KILL_MULTIPLIER, __FUNCTION__)); - auto boostedKillBonus = static_cast(g_configManager().getNumber(BOOSTED_BOSS_KILL_BONUS, __FUNCTION__)); + auto boostedLootBonus = static_cast(g_configManager().getNumber(BOOSTED_BOSS_LOOT_BONUS)); + auto bosstiaryMultiplier = static_cast(g_configManager().getNumber(BOSSTIARY_KILL_MULTIPLIER)); + auto boostedKillBonus = static_cast(g_configManager().getNumber(BOOSTED_BOSS_KILL_BONUS)); sendBosstiarySlotsBytes(msg, static_cast(boostedBossRace), boostedBossKillCount, boostedLootBonus, bosstiaryMultiplier + boostedKillBonus, 0, 0); } @@ -9175,7 +9175,7 @@ void ProtocolGame::sendDoubleSoundEffect( } void ProtocolGame::parseOpenWheel(NetworkMessage &msg) { - if (oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) { + if (oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM)) { return; } @@ -9184,7 +9184,7 @@ void ProtocolGame::parseOpenWheel(NetworkMessage &msg) { } void ProtocolGame::parseWheelGemAction(NetworkMessage &msg) { - if (oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) { + if (oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM)) { return; } @@ -9192,7 +9192,7 @@ void ProtocolGame::parseWheelGemAction(NetworkMessage &msg) { } void ProtocolGame::sendOpenWheelWindow(uint32_t ownerId) { - if (!player || oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) { + if (!player || oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM)) { return; } @@ -9202,7 +9202,7 @@ void ProtocolGame::sendOpenWheelWindow(uint32_t ownerId) { } void ProtocolGame::parseSaveWheel(NetworkMessage &msg) { - if (oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) { + if (oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM)) { return; } diff --git a/src/server/network/protocol/protocollogin.cpp b/src/server/network/protocol/protocollogin.cpp index d3ee6030e1d..f182f957cdb 100644 --- a/src/server/network/protocol/protocollogin.cpp +++ b/src/server/network/protocol/protocollogin.cpp @@ -31,7 +31,7 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const Account account(accountDescriptor); account.setProtocolCompat(oldProtocol); - if (oldProtocol && !g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__)) { + if (oldProtocol && !g_configManager().getBoolean(OLD_PROTOCOL)) { disconnectClient(fmt::format("Only protocol version {}.{} is allowed.", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER)); return; } else if (!oldProtocol) { @@ -47,7 +47,7 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const } auto output = OutputMessagePool::getOutputMessage(); - const std::string &motd = g_configManager().getString(SERVER_MOTD, __FUNCTION__); + const std::string &motd = g_configManager().getString(SERVER_MOTD); if (!motd.empty()) { // Add MOTD output->addByte(0x14); @@ -73,10 +73,10 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const output->addByte(1); // number of worlds output->addByte(0); // world id - output->addString(g_configManager().getString(SERVER_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(IP, __FUNCTION__)); + output->addString(g_configManager().getString(SERVER_NAME)); + output->addString(g_configManager().getString(IP)); - output->add(g_configManager().getNumber(GAME_PORT, __FUNCTION__)); + output->add(g_configManager().getNumber(GAME_PORT)); output->addByte(0); diff --git a/src/server/network/protocol/protocolstatus.cpp b/src/server/network/protocol/protocolstatus.cpp index 4239d6f2300..bed5fd7a9bd 100644 --- a/src/server/network/protocol/protocolstatus.cpp +++ b/src/server/network/protocol/protocolstatus.cpp @@ -27,9 +27,9 @@ void ProtocolStatus::onRecvFirstMessage(NetworkMessage &msg) { uint32_t ip = getIP(); if (ip != 0x0100007F) { std::string ipStr = convertIPToString(ip); - if (ipStr != g_configManager().getString(IP, __FUNCTION__)) { + if (ipStr != g_configManager().getString(IP)) { std::map::const_iterator it = ipConnectMap.find(ip); - if (it != ipConnectMap.end() && (OTSYS_TIME() < (it->second + g_configManager().getNumber(STATUSQUERY_TIMEOUT, __FUNCTION__)))) { + if (it != ipConnectMap.end() && (OTSYS_TIME() < (it->second + g_configManager().getNumber(STATUSQUERY_TIMEOUT)))) { disconnect(); return; } @@ -92,18 +92,18 @@ void ProtocolStatus::sendStatusString() { pugi::xml_node serverinfo = tsqp.append_child("serverinfo"); uint64_t uptime = (OTSYS_TIME() - ProtocolStatus::start) / 1000; serverinfo.append_attribute("uptime") = std::to_string(uptime).c_str(); - serverinfo.append_attribute("ip") = g_configManager().getString(IP, __FUNCTION__).c_str(); - serverinfo.append_attribute("servername") = g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__).c_str(); - serverinfo.append_attribute("port") = std::to_string(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__)).c_str(); - serverinfo.append_attribute("location") = g_configManager().getString(LOCATION, __FUNCTION__).c_str(); - serverinfo.append_attribute("url") = g_configManager().getString(URL, __FUNCTION__).c_str(); + serverinfo.append_attribute("ip") = g_configManager().getString(IP).c_str(); + serverinfo.append_attribute("servername") = g_configManager().getString(ConfigKey_t::SERVER_NAME).c_str(); + serverinfo.append_attribute("port") = std::to_string(g_configManager().getNumber(LOGIN_PORT)).c_str(); + serverinfo.append_attribute("location") = g_configManager().getString(LOCATION).c_str(); + serverinfo.append_attribute("url") = g_configManager().getString(URL).c_str(); serverinfo.append_attribute("server") = ProtocolStatus::SERVER_NAME.c_str(); serverinfo.append_attribute("version") = ProtocolStatus::SERVER_VERSION.c_str(); serverinfo.append_attribute("client") = fmt::format("{}.{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER).c_str(); pugi::xml_node owner = tsqp.append_child("owner"); - owner.append_attribute("name") = g_configManager().getString(OWNER_NAME, __FUNCTION__).c_str(); - owner.append_attribute("email") = g_configManager().getString(OWNER_EMAIL, __FUNCTION__).c_str(); + owner.append_attribute("name") = g_configManager().getString(OWNER_NAME).c_str(); + owner.append_attribute("email") = g_configManager().getString(OWNER_EMAIL).c_str(); pugi::xml_node players = tsqp.append_child("players"); uint32_t real = 0; @@ -123,7 +123,7 @@ void ProtocolStatus::sendStatusString() { } } players.append_attribute("online") = std::to_string(real).c_str(); - players.append_attribute("max") = std::to_string(g_configManager().getNumber(MAX_PLAYERS, __FUNCTION__)).c_str(); + players.append_attribute("max") = std::to_string(g_configManager().getNumber(MAX_PLAYERS)).c_str(); players.append_attribute("peak") = std::to_string(g_game().getPlayersRecord()).c_str(); pugi::xml_node monsters = tsqp.append_child("monsters"); @@ -133,15 +133,15 @@ void ProtocolStatus::sendStatusString() { npcs.append_attribute("total") = std::to_string(g_game().getNpcsOnline()).c_str(); pugi::xml_node rates = tsqp.append_child("rates"); - rates.append_attribute("experience") = std::to_string(g_configManager().getNumber(RATE_EXPERIENCE, __FUNCTION__)).c_str(); - rates.append_attribute("skill") = std::to_string(g_configManager().getNumber(RATE_SKILL, __FUNCTION__)).c_str(); - rates.append_attribute("loot") = std::to_string(g_configManager().getNumber(RATE_LOOT, __FUNCTION__)).c_str(); - rates.append_attribute("magic") = std::to_string(g_configManager().getNumber(RATE_MAGIC, __FUNCTION__)).c_str(); - rates.append_attribute("spawn") = std::to_string(g_configManager().getNumber(RATE_SPAWN, __FUNCTION__)).c_str(); + rates.append_attribute("experience") = std::to_string(g_configManager().getNumber(RATE_EXPERIENCE)).c_str(); + rates.append_attribute("skill") = std::to_string(g_configManager().getNumber(RATE_SKILL)).c_str(); + rates.append_attribute("loot") = std::to_string(g_configManager().getNumber(RATE_LOOT)).c_str(); + rates.append_attribute("magic") = std::to_string(g_configManager().getNumber(RATE_MAGIC)).c_str(); + rates.append_attribute("spawn") = std::to_string(g_configManager().getNumber(RATE_SPAWN)).c_str(); pugi::xml_node map = tsqp.append_child("map"); - map.append_attribute("name") = g_configManager().getString(MAP_NAME, __FUNCTION__).c_str(); - map.append_attribute("author") = g_configManager().getString(MAP_AUTHOR, __FUNCTION__).c_str(); + map.append_attribute("name") = g_configManager().getString(MAP_NAME).c_str(); + map.append_attribute("author") = g_configManager().getString(MAP_AUTHOR).c_str(); uint32_t mapWidth, mapHeight; g_game().getMapDimensions(mapWidth, mapHeight); @@ -149,7 +149,7 @@ void ProtocolStatus::sendStatusString() { map.append_attribute("height") = std::to_string(mapHeight).c_str(); pugi::xml_node motd = tsqp.append_child("motd"); - motd.text() = g_configManager().getString(SERVER_MOTD, __FUNCTION__).c_str(); + motd.text() = g_configManager().getString(SERVER_MOTD).c_str(); std::ostringstream ss; doc.save(ss, "", pugi::format_raw); @@ -165,36 +165,36 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact if (requestedInfo & REQUEST_BASIC_SERVER_INFO) { output->addByte(0x10); - output->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(IP, __FUNCTION__)); - output->addString(std::to_string(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__))); + output->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME)); + output->addString(g_configManager().getString(IP)); + output->addString(std::to_string(g_configManager().getNumber(LOGIN_PORT))); } if (requestedInfo & REQUEST_OWNER_SERVER_INFO) { output->addByte(0x11); - output->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(OWNER_EMAIL, __FUNCTION__)); + output->addString(g_configManager().getString(OWNER_NAME)); + output->addString(g_configManager().getString(OWNER_EMAIL)); } if (requestedInfo & REQUEST_MISC_SERVER_INFO) { output->addByte(0x12); - output->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__)); - output->addString(g_configManager().getString(LOCATION, __FUNCTION__)); - output->addString(g_configManager().getString(URL, __FUNCTION__)); + output->addString(g_configManager().getString(SERVER_MOTD)); + output->addString(g_configManager().getString(LOCATION)); + output->addString(g_configManager().getString(URL)); output->add((OTSYS_TIME() - ProtocolStatus::start) / 1000); } if (requestedInfo & REQUEST_PLAYERS_INFO) { output->addByte(0x20); output->add(static_cast(g_game().getPlayersOnline())); - output->add(g_configManager().getNumber(MAX_PLAYERS, __FUNCTION__)); + output->add(g_configManager().getNumber(MAX_PLAYERS)); output->add(g_game().getPlayersRecord()); } if (requestedInfo & REQUEST_MAP_INFO) { output->addByte(0x30); - output->addString(g_configManager().getString(MAP_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__)); + output->addString(g_configManager().getString(MAP_NAME)); + output->addString(g_configManager().getString(MAP_AUTHOR)); uint32_t mapWidth, mapHeight; g_game().getMapDimensions(mapWidth, mapHeight); output->add(mapWidth); diff --git a/src/server/network/webhook/webhook.cpp b/src/server/network/webhook/webhook.cpp index 7ee4ca31f09..bd0ab9a0c4c 100644 --- a/src/server/network/webhook/webhook.cpp +++ b/src/server/network/webhook/webhook.cpp @@ -38,7 +38,7 @@ Webhook &Webhook::getInstance() { void Webhook::run() { threadPool.detach_task([this] { sendWebhook(); }); g_dispatcher().scheduleEvent( - g_configManager().getNumber(DISCORD_WEBHOOK_DELAY_MS, __FUNCTION__), [this] { run(); }, "Webhook::run" + g_configManager().getNumber(DISCORD_WEBHOOK_DELAY_MS), [this] { run(); }, "Webhook::run" ); } @@ -49,7 +49,7 @@ void Webhook::sendPayload(const std::string &payload, std::string url) { void Webhook::sendMessage(const std::string &title, const std::string &message, int color, std::string url, bool embed) { if (url.empty()) { - url = g_configManager().getString(DISCORD_WEBHOOK_URL, __FUNCTION__); + url = g_configManager().getString(DISCORD_WEBHOOK_URL); } if (url.empty() || title.empty() || message.empty()) { @@ -61,7 +61,7 @@ void Webhook::sendMessage(const std::string &title, const std::string &message, void Webhook::sendMessage(const std::string &message, std::string url) { if (url.empty()) { - url = g_configManager().getString(DISCORD_WEBHOOK_URL, __FUNCTION__); + url = g_configManager().getString(DISCORD_WEBHOOK_URL); } if (url.empty() || message.empty()) { @@ -117,7 +117,7 @@ std::string Webhook::getPayload(const std::string &title, const std::string &mes std::stringstream footer_text; footer_text - << g_configManager().getString(SERVER_NAME, __FUNCTION__) << " | " + << g_configManager().getString(SERVER_NAME) << " | " << time_buf; std::stringstream payload; @@ -127,7 +127,7 @@ std::string Webhook::getPayload(const std::string &title, const std::string &mes if (!message.empty()) { payload << "\"description\": \"" << message << "\", "; } - if (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) { + if (g_configManager().getBoolean(DISCORD_SEND_FOOTER)) { payload << "\"footer\": { \"text\": \"" << footer_text.str() << "\" }, "; } if (color >= 0) { diff --git a/src/server/server.cpp b/src/server/server.cpp index 5ed528f5045..1ef5e01a06d 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -151,8 +151,8 @@ void ServicePort::open(uint16_t port) { pendingStart = false; try { - if (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS, __FUNCTION__)) { - acceptor.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))); + if (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS)) { + acceptor.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))), serverPort))); } else { acceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort))); } diff --git a/src/server/signals.cpp b/src/server/signals.cpp index cb4e083b60c..e309f09ab1e 100644 --- a/src/server/signals.cpp +++ b/src/server/signals.cpp @@ -118,7 +118,7 @@ void Signals::sighupHandler() { g_chat().load(); g_logger().info("Reloaded chatchannels"); - g_luaEnvironment().loadFile(g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/core.lua", "core.lua"); + g_luaEnvironment().loadFile(g_configManager().getString(CORE_DIRECTORY) + "/core.lua", "core.lua"); g_logger().info("Reloaded core.lua"); lua_gc(g_luaEnvironment().getLuaState(), LUA_GCCOLLECT, 0); From c22954847707b6f1f55ed6cf8cea60a91fe18305 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 17:42:13 -0300 Subject: [PATCH 25/29] fix: eventcallback crash (pointer uninitialized) (#2956) --- src/lua/callbacks/events_callbacks.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua/callbacks/events_callbacks.hpp b/src/lua/callbacks/events_callbacks.hpp index 7a5bbe5484e..03e7f5e9551 100644 --- a/src/lua/callbacks/events_callbacks.hpp +++ b/src/lua/callbacks/events_callbacks.hpp @@ -141,10 +141,10 @@ class EventsCallbacks { bool allCallbacksSucceeded = true; for (const auto &[name, callback] : getCallbacksByType(eventType)) { - auto argsCopy = std::make_tuple(args...); if (callback && callback->isLoadedCallback()) { + auto argsCopy = std::make_tuple(args...); bool callbackResult = std::apply( - [&callback, &callbackFunc](auto &&... args) { + [callback, &callbackFunc](auto &&... args) { return ((*callback).*callbackFunc)(std::forward(args)...); }, argsCopy From aff5014ebc43d12b9f3d0fb62284a3d195c83d7f Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 17:47:56 -0300 Subject: [PATCH 26/29] ci/cd: remove qodana (#2957) --- qodana-base.sarif.json | 860634 -------------------------------------- qodana.yml | 675 - 2 files changed, 861309 deletions(-) delete mode 100644 qodana-base.sarif.json delete mode 100644 qodana.yml diff --git a/qodana-base.sarif.json b/qodana-base.sarif.json deleted file mode 100644 index c81fa7f59ab..00000000000 --- a/qodana-base.sarif.json +++ /dev/null @@ -1,860634 +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": "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.yml b/qodana.yml deleted file mode 100644 index 4857043fe5d..00000000000 --- a/qodana.yml +++ /dev/null @@ -1,675 +0,0 @@ -version: "1.0" - -profile: - name: qodana.recommended - -linter: jetbrains/qodana-clang:latest - -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: - # inspections - - name: ClangTidy - - 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: ConstantFunctionResult - - name: ConstantParameter - - name: ConstantConditionsOC - - 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: HidingNonVirtualFunction - - name: NotImplementedFunctions - - name: ArgumentSelectionDefects - - name: ClangdErrorsAndWarnings - - name: EmptyDeclOrStmt - - name: OCInconsistentNaming - - name: PreprocessorComment - - name: Simplify - - name: UnconstrainedVariableType - - name: VirtualCallInCtorOrDtor - # - 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 95dbe280b2ae9a7837a7f5b878bc19c90639b8bf Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 18:15:14 -0300 Subject: [PATCH 27/29] improve: remove qodana and fix eventcallback error (#2958) --- src/lua/callbacks/events_callbacks.hpp | 32 +++++--------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/src/lua/callbacks/events_callbacks.hpp b/src/lua/callbacks/events_callbacks.hpp index 03e7f5e9551..9b80dabd93a 100644 --- a/src/lua/callbacks/events_callbacks.hpp +++ b/src/lua/callbacks/events_callbacks.hpp @@ -90,14 +90,8 @@ class EventsCallbacks { void executeCallback(EventCallback_t eventType, CallbackFunc callbackFunc, Args &&... args) { for (const auto &[name, callback] : getCallbacksByType(eventType)) { if (callback && callback->isLoadedCallback()) { - auto argsCopy = std::make_tuple(args...); - std::apply( - [callback, &callbackFunc](auto &&... args) { - ((*callback).*callbackFunc)(std::forward(args)...); - }, - argsCopy - ); - g_logger().trace("Executed callback: {}", name); + std::invoke(callbackFunc, *callback, std::forward(args)...); + // g_logger().trace("Executed callback: {}", name); } } } @@ -111,22 +105,15 @@ class EventsCallbacks { */ template ReturnValue checkCallbackWithReturnValue(EventCallback_t eventType, CallbackFunc callbackFunc, Args &&... args) { - ReturnValue res = RETURNVALUE_NOERROR; for (const auto &[name, callback] : getCallbacksByType(eventType)) { - auto argsCopy = std::make_tuple(args...); if (callback && callback->isLoadedCallback()) { - ReturnValue callbackResult = std::apply( - [&callback, &callbackFunc](auto &&... args) { - return ((*callback).*callbackFunc)(std::forward(args)...); - }, - argsCopy - ); + ReturnValue callbackResult = std::invoke(callbackFunc, *callback, std::forward(args)...); if (callbackResult != RETURNVALUE_NOERROR) { return callbackResult; } } } - return res; + return RETURNVALUE_NOERROR; } /** @@ -139,17 +126,10 @@ class EventsCallbacks { template bool checkCallback(EventCallback_t eventType, CallbackFunc callbackFunc, Args &&... args) { bool allCallbacksSucceeded = true; - for (const auto &[name, callback] : getCallbacksByType(eventType)) { if (callback && callback->isLoadedCallback()) { - auto argsCopy = std::make_tuple(args...); - bool callbackResult = std::apply( - [callback, &callbackFunc](auto &&... args) { - return ((*callback).*callbackFunc)(std::forward(args)...); - }, - argsCopy - ); - allCallbacksSucceeded = allCallbacksSucceeded && callbackResult; + bool callbackResult = std::invoke(callbackFunc, *callback, std::forward(args)...); + allCallbacksSucceeded &= callbackResult; } } return allCallbacksSucceeded; From 5b55f96da8805f20e815a942794a956b2d701a4d Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 18:34:59 -0300 Subject: [PATCH 28/29] fix: crash when removing items during iteration with ContainerIterator (#2901) The enhancements to the ContainerIterator address critical issues related to deeply nested and cyclic container structures. By implementing cycle detection, traversal depth limitation, the iterator becomes a more reliable and efficient tool for managing complex container hierarchies. These improvements are essential for maintaining the system's performance and stability as it scales and evolves. OBS: Added a talkaction that will make it easier to test (both counting items/subcontainers, which will call the getItems function, which internally calls the ContainerIterator). This will make it easier to know if the modification was done correctly. --- config.lua.dist | 8 +- data/scripts/talkactions/god/test.lua | 46 ++++++ src/config/config_enums.hpp | 1 + src/config/configmanager.cpp | 1 + src/creatures/players/wheel/player_wheel.cpp | 4 +- src/items/containers/container.cpp | 139 ++++++++++++++---- src/items/containers/container.hpp | 109 +++++++++++++- src/items/item.hpp | 10 +- .../creatures/player/player_functions.cpp | 2 + src/lua/functions/items/item_functions.cpp | 19 +++ src/lua/functions/items/item_functions.hpp | 2 + tests/unit/CMakeLists.txt | 1 + tests/unit/items/CMakeLists.txt | 3 + .../unit/items/containers/container_test.cpp | 9 ++ 14 files changed, 310 insertions(+), 44 deletions(-) create mode 100644 tests/unit/items/CMakeLists.txt create mode 100644 tests/unit/items/containers/container_test.cpp diff --git a/config.lua.dist b/config.lua.dist index 113c6b2a4c9..07792a0289b 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -66,8 +66,6 @@ serverMotd = "Welcome to the OTServBR-Global!" statusTimeout = 5 * 1000 replaceKickOnLogin = true maxPacketsPerSecond = 25 -maxItem = 2000 -maxContainer = 100 maxPlayersOnlinePerAccount = 1 maxPlayersOutsidePZPerAccount = 1 @@ -81,6 +79,12 @@ freeDepotLimit = 2000 premiumDepotLimit = 10000 depotBoxes = 20 +-- Item and containers limit +-- NOTE: 'maxContainerDepth' defines the maximum depth to which containers can be nested +maxItem = 5000 +maxContainer = 500 +maxContainerDepth = 200 + -- Augments System (Get more info in: https://github.com/opentibiabr/canary/pull/2602) -- NOTE: the following values are for all weapons and equipments that have type of "increase damage", "powerful impact" and "strong impact". -- To customize the percentage of a particular item with these augment types, please add to the item "augments" section on items.xml as the example above. diff --git a/data/scripts/talkactions/god/test.lua b/data/scripts/talkactions/god/test.lua index 25b2fd49da2..a1357c16108 100644 --- a/data/scripts/talkactions/god/test.lua +++ b/data/scripts/talkactions/god/test.lua @@ -36,3 +36,49 @@ end testLog:separator(" ") testLog:groupType("god") testLog:register() + +-- @module ContainerTalkAction +-- @function Handles the "!testcontainer" TalkAction command for testing the ContainerIterator functionality. +-- +-- This module defines a TalkAction that allows players to inspect their backpack containers. +-- It can optionally remove items from the container based on the provided parameter. +-- The command logs the total number of items and subcontainers found in the backpack. +-- This is primarily used to verify the correctness of changes made to the ContainerIterator. +local containerTalkAction = TalkAction("!testcontainer") + +function containerTalkAction.onSay(player, words, param) + local container = player:getSlotItem(CONST_SLOT_BACKPACK) + if not container then + player:sendCancelMessage("Your backpack does not contain a valid container.") + logger.error("[!container] - Player: {} has a backpack without a valid container.", player:getName()) + return true + end + + local shouldRemove = (param and param:lower() == "remove") and true or false + local items = container:getItems(true) + local totalItems = 0 + local totalSubContainers = 0 + for i, item in pairs(items) do + if shouldRemove and item then + item:remove() + end + + if item:getContainer() then + totalSubContainers = totalSubContainers + 1 + else + totalItems = totalItems + 1 + end + end + + local actionMessage = shouldRemove and "removed " or "have " + local playerMessage = actionMessage .. totalItems .. " items and " .. totalSubContainers .. " subcontainers from your backpack." + local finalMessage = string.format("[!testcontainer] - Player: %s, %s items from backpack: %d, subcontainers count: %d", player:getName(), actionMessage, totalItems, totalSubContainers) + + logger.info(finalMessage) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You " .. playerMessage) + return true +end + +containerTalkAction:separator(" ") +containerTalkAction:groupType("god") +containerTalkAction:register() diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp index 1dfa71ce7dd..559045fdb9b 100644 --- a/src/config/config_enums.hpp +++ b/src/config/config_enums.hpp @@ -142,6 +142,7 @@ enum ConfigKey_t : uint16_t { MAX_ALLOWED_ON_A_DUMMY, MAX_CONTAINER_ITEM, MAX_CONTAINER, + MAX_CONTAINER_DEPTH, MAX_DAMAGE_REFLECTION, MAX_ELEMENTAL_RESISTANCE, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 63779b89f9c..2cae928382f 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -269,6 +269,7 @@ bool ConfigManager::load() { loadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, "maxAllowedOnADummy", 1); loadIntConfig(L, MAX_CONTAINER_ITEM, "maxItem", 5000); loadIntConfig(L, MAX_CONTAINER, "maxContainer", 500); + loadIntConfig(L, MAX_CONTAINER_DEPTH, "maxContainerDepth", 200); loadIntConfig(L, MAX_DAMAGE_REFLECTION, "maxDamageReflection", 200); loadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, "maxElementalResistance", 200); loadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, "maxMarketOffersAtATimePerPlayer", 100); diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index 11ab7495ead..3d0a3619bd0 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -143,9 +143,7 @@ namespace { } // namespace PlayerWheel::PlayerWheel(Player &initPlayer) : - m_player(initPlayer) { - auto pointsPerLevel = (uint16_t)g_configManager().getNumber(WHEEL_POINTS_PER_LEVEL); - m_pointsPerLevel = pointsPerLevel > 0 ? pointsPerLevel : 1; + m_pointsPerLevel(g_configManager().getNumber(WHEEL_POINTS_PER_LEVEL)), m_player(initPlayer) { } bool PlayerWheel::canPlayerSelectPointOnSlot(WheelSlots_t slot, bool recursive) const { diff --git a/src/items/containers/container.cpp b/src/items/containers/container.cpp index ce49d2efc1c..595ae38dedf 100644 --- a/src/items/containers/container.cpp +++ b/src/items/containers/container.cpp @@ -506,8 +506,8 @@ ReturnValue Container::queryAdd(int32_t addIndex, const std::shared_ptr & return RETURNVALUE_CONTAINERNOTENOUGHROOM; } - if (const auto topParentContainer = getTopParentContainer()) { - if (const auto addContainer = item->getContainer()) { + if (const auto &topParentContainer = getTopParentContainer()) { + if (const auto &addContainer = item->getContainer()) { uint32_t addContainerCount = addContainer->getContainerHoldingCount() + 1; uint32_t maxContainer = static_cast(g_configManager().getNumber(MAX_CONTAINER)); if (addContainerCount + topParentContainer->getContainerHoldingCount() > maxContainer) { @@ -917,12 +917,7 @@ uint16_t Container::getFreeSlots() { } ContainerIterator Container::iterator() { - ContainerIterator cit; - if (!itemlist.empty()) { - cit.over.push_back(getContainer()); - cit.cur = itemlist.begin(); - } - return cit; + return { getContainer(), static_cast(g_configManager().getNumber(MAX_CONTAINER_DEPTH)) }; } void Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) { @@ -947,39 +942,125 @@ void Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient } } -std::shared_ptr ContainerIterator::operator*() { - return *cur; +uint32_t Container::getOwnerId() const { + uint32_t ownerId = Item::getOwnerId(); + if (ownerId > 0) { + return ownerId; + } + for (const auto &item : itemlist) { + ownerId = item->getOwnerId(); + if (ownerId > 0) { + return ownerId; + } + } + return 0; +} + +/** + * ContainerIterator + * @brief Iterator for iterating over the items in a container + */ +ContainerIterator::ContainerIterator(const std::shared_ptr &container, size_t maxDepth) : + maxTraversalDepth(maxDepth) { + if (container) { + states.reserve(maxDepth); + visitedContainers.reserve(g_configManager().getNumber(MAX_CONTAINER)); + (void)states.emplace_back(container, 0, 1); + (void)visitedContainers.insert(container); + } +} + +bool ContainerIterator::hasNext() const { + while (!states.empty()) { + const auto &top = states.back(); + const auto &container = top.container.lock(); + if (!container) { + // Container has been deleted + states.pop_back(); + } else if (top.index < container->itemlist.size()) { + return true; + } else { + states.pop_back(); + } + } + return false; } void ContainerIterator::advance() { - if (std::shared_ptr i = *cur) { - if (std::shared_ptr c = i->getContainer()) { - if (!c->empty()) { - over.push_back(c); + if (states.empty()) { + return; + } + + auto &top = states.back(); + const auto &container = top.container.lock(); + if (!container) { + // Container has been deleted + states.pop_back(); + return; + } + + if (top.index >= container->itemlist.size()) { + states.pop_back(); + return; + } + + auto currentItem = container->itemlist[top.index]; + if (currentItem) { + auto subContainer = currentItem->getContainer(); + if (subContainer && !subContainer->itemlist.empty()) { + size_t newDepth = top.depth + 1; + if (newDepth <= maxTraversalDepth) { + if (visitedContainers.find(subContainer) == visitedContainers.end()) { + states.emplace_back(subContainer, 0, newDepth); + visitedContainers.insert(subContainer); + } else { + if (!m_cycleDetected) { + g_logger().trace("[{}] Cycle detected in container: {}", __FUNCTION__, subContainer->getName()); + m_cycleDetected = true; + } + } + } else { + if (!m_maxDepthReached) { + g_logger().trace("[{}] Maximum iteration depth reached", __FUNCTION__); + m_maxDepthReached = true; + } } } } - ++cur; + ++top.index; +} + +std::shared_ptr ContainerIterator::operator*() const { + if (states.empty()) { + return nullptr; + } - if (cur == over.front()->itemlist.end()) { - over.pop_front(); - if (!over.empty()) { - cur = over.front()->itemlist.begin(); + const auto &top = states.back(); + if (const auto &container = top.container.lock()) { + if (top.index < container->itemlist.size()) { + return container->itemlist[top.index]; } } + return nullptr; } -uint32_t Container::getOwnerId() const { - uint32_t ownerId = Item::getOwnerId(); - if (ownerId > 0) { - return ownerId; +bool ContainerIterator::hasReachedMaxDepth() const { + return m_maxDepthReached; +} + +std::shared_ptr ContainerIterator::getCurrentContainer() const { + if (states.empty()) { + return nullptr; } - for (const auto &item : itemlist) { - ownerId = item->getOwnerId(); - if (ownerId > 0) { - return ownerId; - } + const auto &top = states.back(); + return top.container.lock(); +} + +size_t ContainerIterator::getCurrentIndex() const { + if (states.empty()) { + return 0; } - return 0; + const auto &top = states.back(); + return top.index; } diff --git a/src/items/containers/container.hpp b/src/items/containers/container.hpp index 6ef2daa7860..e07b2edff3a 100644 --- a/src/items/containers/container.hpp +++ b/src/items/containers/container.hpp @@ -21,16 +21,111 @@ class Reward; class ContainerIterator { public: - bool hasNext() const { - return !over.empty(); - } - + /** + * @brief Constructs a ContainerIterator with a specified container and maximum traversal depth. + * + * This constructor initializes the iterator to start iterating over the specified container + * and ensures that it will not traverse deeper than the specified maxDepth. + * + * @param container The root container to start iterating from. + * @param maxDepth The maximum depth of nested containers to traverse. + */ + ContainerIterator(const std::shared_ptr &container, size_t maxDepth); + + /** + * @brief Checks if there are more items to iterate over in the container. + * + * This function checks if there are more items to iterate over in the current container or + * in any of the nested sub-containers. If no items are left, the function will return false. + * + * @return true if there are more items to iterate over; false otherwise. + */ + bool hasNext() const; + + /** + * @brief Advances the iterator to the next item in the container. + * + * This function moves the iterator to the next item. If the current item is a sub-container, + * it adds that sub-container to the stack to iterate over its items as well. + * It also handles maximum depth and cycle detection to prevent infinite loops. + */ void advance(); - std::shared_ptr operator*(); + + /** + * @brief Returns the current item pointed to by the iterator. + * + * This function returns the current item in the container that the iterator points to. + * If there are no more items to iterate over, it returns nullptr. + * + * @return A shared pointer to the current item, or nullptr if no items are left. + */ + std::shared_ptr operator*() const; + + bool hasReachedMaxDepth() const; + + std::shared_ptr getCurrentContainer() const; + size_t getCurrentIndex() const; private: - std::list> over; - ItemDeque::const_iterator cur; + /** + * @brief Represents the state of the iterator at a given point in time. + * + * This structure is used to keep track of the current container, + * the index of the current item within that container, and the depth + * of traversal for nested containers. It is primarily used in the + * ContainerIterator to manage the state of the iteration as it traverses + * through containers and their sub-containers. + */ + struct IteratorState { + /** + * @brief The container being iterated over. + */ + std::weak_ptr container; + + /** + * @brief The current index within the container's item list. + */ + size_t index; + + /** + * @brief The depth of traversal, indicating how deep the iteration is + * within nested sub-containers. + */ + size_t depth; + + /** + * @brief Constructs an IteratorState with the given container, index, and depth. + * + * @param c The container to iterate over. + * @param i The starting index within the container. + * @param d The depth of traversal. + */ + IteratorState(std::shared_ptr c, size_t i, size_t d) : + container(c), index(i), depth(d) { } + }; + + /** + * @brief Stack of IteratorState objects representing the state of the iteration. + * + * This stack keeps track of the current position in each container and is + * used to traverse containers and their nested sub-containers in a depth-first manner. + * Each element in the stack represents a different level in the container hierarchy. + */ + mutable std::vector states; + + /** + * @brief Set of containers that have already been visited during the iteration. + * + * This set is used to keep track of all containers that have been visited + * to avoid revisiting them and causing infinite loops or cycles. It ensures + * that each container is processed only once, preventing redundant processing + * and potential crashes due to cyclic references. + */ + mutable std::unordered_set> visitedContainers; + size_t maxTraversalDepth = 0; + + bool m_maxDepthReached = false; + bool m_cycleDetected = false; friend class Container; }; diff --git a/src/items/item.hpp b/src/items/item.hpp index 9bea63158f3..aa4f10ec4aa 100644 --- a/src/items/item.hpp +++ b/src/items/item.hpp @@ -428,7 +428,7 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { std::vector> getAugments() const { return items[id].augments; } - std::vector> getAugmentsBySpellNameAndType(std::string spellName, Augment_t augmentType) const { + std::vector> getAugmentsBySpellNameAndType(const std::string &spellName, Augment_t augmentType) const { std::vector> augments; for (auto &augment : items[id].augments) { if (strcasecmp(augment->spellName.c_str(), spellName.c_str()) == 0 && augment->type == augmentType) { @@ -438,7 +438,7 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { return augments; } - std::vector> getAugmentsBySpellName(std::string spellName) const { + std::vector> getAugmentsBySpellName(const std::string &spellName) const { std::vector> augments; for (auto &augment : items[id].augments) { if (strcasecmp(augment->spellName.c_str(), spellName.c_str()) == 0) { @@ -597,7 +597,11 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { count = n; } - static uint32_t countByType(std::shared_ptr item, int32_t subType) { + static uint32_t countByType(const std::shared_ptr &item, int32_t subType) { + if (!item) { + return 0; + } + if (subType == -1 || subType == item->getSubType()) { return item->getItemCount(); } diff --git a/src/lua/functions/creatures/player/player_functions.cpp b/src/lua/functions/creatures/player/player_functions.cpp index d148acf8397..cbb0a18afd7 100644 --- a/src/lua/functions/creatures/player/player_functions.cpp +++ b/src/lua/functions/creatures/player/player_functions.cpp @@ -1864,6 +1864,8 @@ int PlayerFunctions::luaPlayerAddItem(lua_State* L) { if (!hasTable) { lua_pushnil(L); } + + player->sendCancelMessage(ret); return 1; } diff --git a/src/lua/functions/items/item_functions.cpp b/src/lua/functions/items/item_functions.cpp index 5d22b6d3102..7b5713f29b1 100644 --- a/src/lua/functions/items/item_functions.cpp +++ b/src/lua/functions/items/item_functions.cpp @@ -37,6 +37,25 @@ int ItemFunctions::luaItemIsItem(lua_State* L) { return 1; } +int ItemFunctions::luaItemGetContainer(lua_State* L) { + // item:getContainer() + const auto &item = getUserdataShared(L, 1); + if (!item) { + lua_pushnil(L); + return 1; + } + + const auto &container = item->getContainer(); + if (!container) { + g_logger().trace("Item {} is not a container", item->getName()); + pushBoolean(L, false); + return 1; + } + + pushUserdata(L, container); + return 1; +} + int ItemFunctions::luaItemGetParent(lua_State* L) { // item:getParent() std::shared_ptr item = getUserdataShared(L, 1); diff --git a/src/lua/functions/items/item_functions.hpp b/src/lua/functions/items/item_functions.hpp index 44e111479a3..ab3e91e1648 100644 --- a/src/lua/functions/items/item_functions.hpp +++ b/src/lua/functions/items/item_functions.hpp @@ -23,6 +23,7 @@ class ItemFunctions final : LuaScriptInterface { registerMethod(L, "Item", "isItem", ItemFunctions::luaItemIsItem); + registerMethod(L, "Item", "getContainer", ItemFunctions::luaItemGetContainer); registerMethod(L, "Item", "getParent", ItemFunctions::luaItemGetParent); registerMethod(L, "Item", "getTopParent", ItemFunctions::luaItemGetTopParent); @@ -101,6 +102,7 @@ class ItemFunctions final : LuaScriptInterface { static int luaItemIsItem(lua_State* L); + static int luaItemGetContainer(lua_State* L); static int luaItemGetParent(lua_State* L); static int luaItemGetTopParent(lua_State* L); diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 5da4ec590ce..991a0102522 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -1,6 +1,7 @@ setup_test(canary_ut unit) add_subdirectory(account) +add_subdirectory(items) add_subdirectory(kv) add_subdirectory(lib) add_subdirectory(security) diff --git a/tests/unit/items/CMakeLists.txt b/tests/unit/items/CMakeLists.txt new file mode 100644 index 00000000000..13acdb4769c --- /dev/null +++ b/tests/unit/items/CMakeLists.txt @@ -0,0 +1,3 @@ +target_sources(canary_ut PRIVATE + containers/container_test.cpp +) diff --git a/tests/unit/items/containers/container_test.cpp b/tests/unit/items/containers/container_test.cpp new file mode 100644 index 00000000000..c6d36faeb67 --- /dev/null +++ b/tests/unit/items/containers/container_test.cpp @@ -0,0 +1,9 @@ +#include "pch.hpp" + +#include + +#include "lib/logging/in_memory_logger.hpp" + +#include "items/containers/container.hpp" + +using namespace boost::ut; From ad567229df5e67706c5cb24ad8c356e83eca213a Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Wed, 9 Oct 2024 23:22:15 -0300 Subject: [PATCH 29/29] fix: npc submenu shop window (#2852) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed to open submenus even after having a shop window open • Fixed so that when saying "trade" it informs the other available categories --- data-otservbr-global/npc/alaistar.lua | 8 +-- data-otservbr-global/npc/alexander.lua | 10 +-- data-otservbr-global/npc/asima.lua | 9 +-- data-otservbr-global/npc/battlemart.lua | 11 ++-- data-otservbr-global/npc/chuckles.lua | 9 +-- data-otservbr-global/npc/fenech.lua | 10 +-- data-otservbr-global/npc/frans.lua | 10 +-- data-otservbr-global/npc/frederik.lua | 11 +--- data-otservbr-global/npc/ghorza.lua | 10 +-- data-otservbr-global/npc/gnomegica.lua | 10 +-- data-otservbr-global/npc/hamish.lua | 10 ++- data-otservbr-global/npc/hireling.lua | 3 +- data-otservbr-global/npc/khanna.lua | 10 +-- data-otservbr-global/npc/mordecai.lua | 10 +-- data-otservbr-global/npc/nelly.lua | 10 +-- data-otservbr-global/npc/nipuna.lua | 10 +-- data-otservbr-global/npc/rabaz.lua | 10 +-- data-otservbr-global/npc/rachel.lua | 14 +--- data-otservbr-global/npc/richard.lua | 66 ++++++++++++------- .../npc/rock_in_a_hard_place.lua | 10 +-- data-otservbr-global/npc/romir.lua | 14 +--- data-otservbr-global/npc/shiriel.lua | 14 +--- data-otservbr-global/npc/sigurd.lua | 14 +--- data-otservbr-global/npc/sundara.lua | 14 +--- data-otservbr-global/npc/tandros.lua | 14 +--- data-otservbr-global/npc/the_lootmonger.lua | 12 ++-- data-otservbr-global/npc/topsy.lua | 14 +--- data-otservbr-global/npc/xodet.lua | 14 +--- data/npclib/npc.lua | 24 +++++++ src/creatures/players/player.cpp | 2 +- .../functions/creatures/npc/npc_functions.cpp | 2 + 31 files changed, 150 insertions(+), 239 deletions(-) diff --git a/data-otservbr-global/npc/alaistar.lua b/data-otservbr-global/npc/alaistar.lua index 68aaa75679a..c82e478e89b 100644 --- a/data-otservbr-global/npc/alaistar.lua +++ b/data-otservbr-global/npc/alaistar.lua @@ -114,15 +114,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true diff --git a/data-otservbr-global/npc/alexander.lua b/data-otservbr-global/npc/alexander.lua index 52b98a9760e..bd6a0329652 100644 --- a/data-otservbr-global/npc/alexander.lua +++ b/data-otservbr-global/npc/alexander.lua @@ -134,11 +134,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then @@ -163,7 +158,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -175,7 +171,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Hi there |PLAYERNAME|, and welcome to the {magic} store.") npcHandler:setMessage(MESSAGE_FAREWELL, "See you, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_WALKAWAY, "See you, |PLAYERNAME|.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {runes} or {wands}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/asima.lua b/data-otservbr-global/npc/asima.lua index c3aca3fcd5e..2d209e95d4c 100644 --- a/data-otservbr-global/npc/asima.lua +++ b/data-otservbr-global/npc/asima.lua @@ -145,11 +145,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then @@ -174,12 +169,14 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true end +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/battlemart.lua b/data-otservbr-global/npc/battlemart.lua index 4cc010da066..e19ba50b6e5 100644 --- a/data-otservbr-global/npc/battlemart.lua +++ b/data-otservbr-global/npc/battlemart.lua @@ -196,16 +196,12 @@ local itemsTable = { } local function creatureSayCallback(npc, player, type, message) - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if MsgContains(message, "shop options") then - npcHandler:say("I sell a selection of " .. table.concat(formattedCategoryNames, ", "), npc, player) + npcHandler:say("I sell a selection of " .. npc:getFormattedCategoryNames(itemsTable), npc, player) elseif categoryTable then - npcHandler:say("Here are the items for the category " .. message, npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end end @@ -213,6 +209,7 @@ end npcHandler:setMessage(MESSAGE_GREET, "It is good to see you. I'm always at your {shop options}") npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell, |PLAYERNAME|, I'll be here if you need me again.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Come back soon!") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/chuckles.lua b/data-otservbr-global/npc/chuckles.lua index 4eb06b6bb3d..5642304172f 100644 --- a/data-otservbr-global/npc/chuckles.lua +++ b/data-otservbr-global/npc/chuckles.lua @@ -135,20 +135,17 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true end +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/fenech.lua b/data-otservbr-global/npc/fenech.lua index f69dcafaa89..acc2ab55b45 100644 --- a/data-otservbr-global/npc/fenech.lua +++ b/data-otservbr-global/npc/fenech.lua @@ -134,11 +134,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then @@ -163,7 +158,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -173,7 +169,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Be mourned pilgrim in flesh and welcome to the magic store.") npcHandler:setMessage(MESSAGE_FAREWELL, "May enlightenment be your path.") npcHandler:setMessage(MESSAGE_WALKAWAY, "May enlightenment be your path.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/frans.lua b/data-otservbr-global/npc/frans.lua index a1b695adf14..ad5b30c4fd5 100644 --- a/data-otservbr-global/npc/frans.lua +++ b/data-otservbr-global/npc/frans.lua @@ -116,15 +116,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -134,7 +130,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Beeee greeeeted, Simula! What is your neeeed?") npcHandler:setMessage(MESSAGE_FAREWELL, "Bye.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/frederik.lua b/data-otservbr-global/npc/frederik.lua index 81ff1ec58b6..d7850598c56 100644 --- a/data-otservbr-global/npc/frederik.lua +++ b/data-otservbr-global/npc/frederik.lua @@ -140,15 +140,10 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] - if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -158,7 +153,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Hi there and welcome to my little magic shop.") npcHandler:setMessage(MESSAGE_FAREWELL, "Yeah, bye.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Yeah, bye.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions}, {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/ghorza.lua b/data-otservbr-global/npc/ghorza.lua index 17f752e7435..43db1d3238f 100644 --- a/data-otservbr-global/npc/ghorza.lua +++ b/data-otservbr-global/npc/ghorza.lua @@ -123,15 +123,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -141,7 +137,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Hello, scraggy human.") npcHandler:setMessage(MESSAGE_FAREWELL, "Take care of evil spirits.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Take care of evil spirits.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/gnomegica.lua b/data-otservbr-global/npc/gnomegica.lua index b860caf3962..5b776260bd5 100644 --- a/data-otservbr-global/npc/gnomegica.lua +++ b/data-otservbr-global/npc/gnomegica.lua @@ -136,15 +136,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -154,7 +150,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Greetings! You came to the right gnome to buy {potions}, {runes} or {wands}. So let's talk about a {trade}.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and come again.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye and come again.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions}, {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/hamish.lua b/data-otservbr-global/npc/hamish.lua index b00d21393a6..050fc41dbb9 100644 --- a/data-otservbr-global/npc/hamish.lua +++ b/data-otservbr-global/npc/hamish.lua @@ -162,11 +162,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if MsgContains(message, "dawnport") then npcHandler:say({ @@ -191,7 +186,8 @@ local function creatureSayCallback(npc, creature, type, message) He even has a crush on lady Oressa. Cute. ", }, npc, creature, 200) elseif categoryTable then - npcHandler:say("Take your pick!", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -203,6 +199,8 @@ npcHandler:setMessage( "Hi there, fellow adventurer. \z What's your need? Say {trade} and we'll soon get you fixed up. Or ask me about {potions}, {wands}, or {runes}." ) + +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:setMessage(MESSAGE_FAREWELL, "Use your runes wisely!") npcHandler:setMessage(MESSAGE_WALKAWAY, "Use your runes wisely!") npcHandler:setMessage(MESSAGE_SENDTRADE, "Take your pick! Or maybe you want to look only at {potions}, {wands} or {runes}?") diff --git a/data-otservbr-global/npc/hireling.lua b/data-otservbr-global/npc/hireling.lua index 6897bafdcf7..ce5c6737e02 100644 --- a/data-otservbr-global/npc/hireling.lua +++ b/data-otservbr-global/npc/hireling.lua @@ -674,7 +674,8 @@ function createHirelingType(HirelingName) local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Here are the items for the category " .. message .. ".", npc, creature) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end end diff --git a/data-otservbr-global/npc/khanna.lua b/data-otservbr-global/npc/khanna.lua index 76b5c1e70da..497a8f87c64 100644 --- a/data-otservbr-global/npc/khanna.lua +++ b/data-otservbr-global/npc/khanna.lua @@ -173,11 +173,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then @@ -202,14 +197,15 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif categoryTable then - npcHandler:say("Take your pick!", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/mordecai.lua b/data-otservbr-global/npc/mordecai.lua index dc0e3c07a77..3b2ec4e60e8 100644 --- a/data-otservbr-global/npc/mordecai.lua +++ b/data-otservbr-global/npc/mordecai.lua @@ -143,15 +143,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Choose wisely!", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -161,7 +157,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Welcome to the magic emporium, child. Ask me for a trade if you need {runes}, {wands}, or spellbooks.") npcHandler:setMessage(MESSAGE_FAREWELL, "Take care, child.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Ah, the impetuosity of youth.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Choose wisely! Or maybe you want to look only at {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Choose wisely! Or maybe you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/nelly.lua b/data-otservbr-global/npc/nelly.lua index 911464524c6..8a3cb6be150 100644 --- a/data-otservbr-global/npc/nelly.lua +++ b/data-otservbr-global/npc/nelly.lua @@ -152,15 +152,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -170,7 +166,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|, What can I do for you? I'm working for the post office, but I also trade with important {potions}, {runes} and other magical equipment.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Ah, the impetuosity of youth.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {post stuff}, {potions}, {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/nipuna.lua b/data-otservbr-global/npc/nipuna.lua index ef3211bce42..d428b45c9c8 100644 --- a/data-otservbr-global/npc/nipuna.lua +++ b/data-otservbr-global/npc/nipuna.lua @@ -156,22 +156,18 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions}, {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/rabaz.lua b/data-otservbr-global/npc/rabaz.lua index df9e8ca2ca5..0de19876209 100644 --- a/data-otservbr-global/npc/rabaz.lua +++ b/data-otservbr-global/npc/rabaz.lua @@ -140,11 +140,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if MsgContains(message, "mission") then if player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) < 1 then @@ -189,7 +184,8 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif categoryTable then - npcHandler:say("Have a look.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -199,7 +195,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Ah, a customer! Please feel free to browse my wares, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Have a look. But perhaps you just want to see my {potions}, {wands} or {runes}?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Have a look. But perhaps you just want to see my " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/rachel.lua b/data-otservbr-global/npc/rachel.lua index 057787692c9..a301abf2f93 100644 --- a/data-otservbr-global/npc/rachel.lua +++ b/data-otservbr-global/npc/rachel.lua @@ -142,11 +142,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then @@ -171,7 +166,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -181,11 +177,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Welcome |PLAYERNAME|! Whats your need?") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye, |PLAYERNAME|.") -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/richard.lua b/data-otservbr-global/npc/richard.lua index d38b6c93b0b..9f3c8ad36e3 100644 --- a/data-otservbr-global/npc/richard.lua +++ b/data-otservbr-global/npc/richard.lua @@ -22,27 +22,42 @@ npcConfig.outfit = { npcConfig.flags = { floorchange = false, } -npcConfig.shop = { - { itemName = "backpack", clientId = 2854, buy = 10, count = 1 }, - { itemName = "bag", clientId = 2853, buy = 4, count = 1 }, - { itemName = "bread", clientId = 3600, buy = 3, count = 1 }, - { itemName = "carrot", clientId = 3595, buy = 1, count = 1 }, - { itemName = "cheese", clientId = 3607, sell = 2, count = 1 }, - { itemName = "cherry", clientId = 3590, buy = 1, count = 1 }, - { itemName = "egg", clientId = 3606, buy = 1, count = 1 }, - { itemName = "fishing rod", clientId = 3483, sell = 30, count = 1 }, - { itemName = "ham", clientId = 3582, buy = 8, count = 1 }, - { itemName = "machete", clientId = 3308, buy = 6, count = 1 }, - { itemName = "meat", clientId = 3577, sell = 2, count = 1 }, - { itemName = "pick", clientId = 3456, buy = 15, count = 1 }, - { itemName = "rope", clientId = 3003, sell = 8, count = 1 }, - { itemName = "salmon", clientId = 3579, buy = 2, count = 1 }, - { itemName = "scroll", clientId = 2815, buy = 5, count = 1 }, - { itemName = "shovel", clientId = 3457, sell = 2, count = 1 }, - { itemName = "torch", clientId = 2920, buy = 2, count = 1 }, - { itemName = "worm", clientId = 3492, buy = 1, count = 1 }, +local itemsTable = { + ["containers"] = { + { itemName = "backpack", clientId = 2854, buy = 10, count = 1 }, + { itemName = "bag", clientId = 2853, buy = 4, count = 1 }, + }, + ["food"] = { + { itemName = "bread", clientId = 3600, buy = 3, count = 1 }, + { itemName = "carrot", clientId = 3595, buy = 1, count = 1 }, + { itemName = "cheese", clientId = 3607, sell = 2, count = 1 }, + { itemName = "cherry", clientId = 3590, buy = 1, count = 1 }, + { itemName = "egg", clientId = 3606, buy = 1, count = 1 }, + { itemName = "ham", clientId = 3582, buy = 8, count = 1 }, + { itemName = "meat", clientId = 3577, sell = 2, count = 1 }, + { itemName = "salmon", clientId = 3579, buy = 2, count = 1 }, + }, + ["equipment"] = { + { itemName = "fishing rod", clientId = 3483, sell = 30, count = 1 }, + { itemName = "machete", clientId = 3308, buy = 6, count = 1 }, + { itemName = "pick", clientId = 3456, buy = 15, count = 1 }, + { itemName = "rope", clientId = 3003, sell = 8, count = 1 }, + { itemName = "shovel", clientId = 3457, sell = 2, count = 1 }, + { itemName = "torch", clientId = 2920, buy = 2, count = 1 }, + }, + ["others"] = { + { itemName = "scroll", clientId = 2815, buy = 5, count = 1 }, + { itemName = "worm", clientId = 3492, buy = 1, count = 1 }, + }, } +npcConfig.shop = {} +for _, category in pairs(itemsTable) do + for _, item in ipairs(category) do + table.insert(npcConfig.shop, item) + end +end + -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) @@ -103,6 +118,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local categoryTable = itemsTable[message:lower()] if MsgContains(message, "job") then npcHandler:say({ "I was a carpenter, back on Main. Wanted my own little shop. Didn't sit with the old man. \z @@ -114,9 +130,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say({ "Only the best quality, I assure you. A rope in need is a friend indeed! Imagine you stumble into a rat \z hole without a rope - heh, your bones will be gnawed clean before someone finds ya!", - "Now, about that rope - ask me for equipment to see my wares. ", + "Now, about that rope - ask me for {equipment} to see my wares. ", }, npc, creature, 10) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end @@ -178,11 +198,7 @@ keywordHandler:addKeyword({ "hamish" }, StdModule.say, { }) npcHandler:setMessage(MESSAGE_GREET, "Hello there, mate. Here for a {trade}? My stock's just been refilled.") -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - You can also have a look at food or {equipment} only." -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:setMessage(MESSAGE_FAREWELL, "Have fun!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) diff --git a/data-otservbr-global/npc/rock_in_a_hard_place.lua b/data-otservbr-global/npc/rock_in_a_hard_place.lua index 64ee5e08174..7abec0e60d1 100644 --- a/data-otservbr-global/npc/rock_in_a_hard_place.lua +++ b/data-otservbr-global/npc/rock_in_a_hard_place.lua @@ -274,15 +274,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Here, have a look", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -292,7 +288,7 @@ local function onTradeRequest(npc, creature) local player = Player(creature) local playerId = player:getId() - npcHandler:say("You would be surprised how many things are washed ashore here. I trade {magic stuff}, {local equipment}, {weapons}, {armor}, {ammunition}, {post things} and {creature products}.", npc, creature) + npcHandler:say("You would be surprised how many things are washed ashore here. I trade " .. GetFormattedShopCategoryNames(itemsTable) .. ".", npc, creature) return true end diff --git a/data-otservbr-global/npc/romir.lua b/data-otservbr-global/npc/romir.lua index 09ab62ab1a4..c658e358e6f 100644 --- a/data-otservbr-global/npc/romir.lua +++ b/data-otservbr-global/npc/romir.lua @@ -140,15 +140,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -158,11 +154,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Greetings, traveller. I'm a magical trader and trainer for sorcerer spells. How may I help you?") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye.") -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/shiriel.lua b/data-otservbr-global/npc/shiriel.lua index fd982f345b9..eda4a03f1e0 100644 --- a/data-otservbr-global/npc/shiriel.lua +++ b/data-otservbr-global/npc/shiriel.lua @@ -128,15 +128,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -146,11 +142,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_FAREWELL, "Goodbye, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Goodbye, |PLAYERNAME|.") -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- Greeting message diff --git a/data-otservbr-global/npc/sigurd.lua b/data-otservbr-global/npc/sigurd.lua index e4d1b585307..57d14f02f4b 100644 --- a/data-otservbr-global/npc/sigurd.lua +++ b/data-otservbr-global/npc/sigurd.lua @@ -130,15 +130,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -148,11 +144,7 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Welcome to the magic store, |PLAYERNAME|! Ask me for a trade if you need something.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye. Come back soon.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye. Come back soon.") -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/sundara.lua b/data-otservbr-global/npc/sundara.lua index 95ff206f2ad..b75a7349432 100644 --- a/data-otservbr-global/npc/sundara.lua +++ b/data-otservbr-global/npc/sundara.lua @@ -156,26 +156,18 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/tandros.lua b/data-otservbr-global/npc/tandros.lua index ae647b26127..07e51abc163 100644 --- a/data-otservbr-global/npc/tandros.lua +++ b/data-otservbr-global/npc/tandros.lua @@ -146,26 +146,18 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] if categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- On buy npc shop message diff --git a/data-otservbr-global/npc/the_lootmonger.lua b/data-otservbr-global/npc/the_lootmonger.lua index e0c2b03da32..cb42a0be210 100644 --- a/data-otservbr-global/npc/the_lootmonger.lua +++ b/data-otservbr-global/npc/the_lootmonger.lua @@ -55,23 +55,19 @@ npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) npcConfig.shop = LootShopConfig local function creatureSayCallback(npc, player, type, message) - local formattedCategoryNames = {} - for categoryName, _ in pairs(LootShopConfigTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = LootShopConfigTable[message:lower()] if MsgContains(message, "shop options") then - npcHandler:say("I sell a selection of " .. table.concat(formattedCategoryNames, ", "), npc, player) + npcHandler:say("I sell a selection of " .. GetFormattedShopCategoryNames(LootShopConfigTable), npc, player) elseif categoryTable then - npcHandler:say("Here are the items for the category " .. message, npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), LootShopConfigTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Ah, a customer! Be greeted, |PLAYERNAME|! I buy all kinds of loot, would you like a {trade}? I can also show you my {shop options}.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Ah, a customer! Be greeted, |PLAYERNAME|! I buy all kinds of loot, would you like a {trade}? I can also show you my {shop options}.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Ah, a customer! Be greeted, |PLAYERNAME|! I buy all kinds of loot, would you look at " .. GetFormattedShopCategoryNames(LootShopConfigTable) .. ".") -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/topsy.lua b/data-otservbr-global/npc/topsy.lua index 66ea6f27e6a..c37faecb0fd 100644 --- a/data-otservbr-global/npc/topsy.lua +++ b/data-otservbr-global/npc/topsy.lua @@ -141,11 +141,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then @@ -170,7 +165,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -182,11 +178,7 @@ npcHandler:setMessage( "Hello, dear |PLAYERNAME|. How can I help you? \z If you need magical equipment such as {runes} or {wands}, just ask me for a {trade}." ) -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|. Do come again!") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye, |PLAYERNAME|. Do come again!") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/xodet.lua b/data-otservbr-global/npc/xodet.lua index f687b491e89..f1148505266 100644 --- a/data-otservbr-global/npc/xodet.lua +++ b/data-otservbr-global/npc/xodet.lua @@ -135,11 +135,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local formattedCategoryNames = {} - for categoryName, _ in pairs(itemsTable) do - table.insert(formattedCategoryNames, "{" .. categoryName .. "}") - end - local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then @@ -164,7 +159,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif categoryTable then - npcHandler:say("Of course, just browse through my wares.", npc, player) + local remainingCategories = npc:getRemainingShopCategories(message:lower(), itemsTable) + npcHandler:say("Of course, just browse through my wares. You can also look at " .. remainingCategories .. ".", npc, player) npc:openShopWindowTable(player, categoryTable) end return true @@ -176,11 +172,7 @@ npcHandler:setMessage( "Oh, please come in, |PLAYERNAME| \z If you need magical equipment such as {runes} or {wands}, just ask me for a {trade}." ) -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. \z - Or do you want to look only at {potions}, {wands} or {runes}?" -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at " .. GetFormattedShopCategoryNames(itemsTable) .. ".") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and come again.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye and come again.") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data/npclib/npc.lua b/data/npclib/npc.lua index 30305778707..4de60c45c49 100644 --- a/data/npclib/npc.lua +++ b/data/npclib/npc.lua @@ -28,6 +28,30 @@ function MsgFind(message, keyword) return string.find(lowerMessage, lowerKeyword) and string.find(lowerMessage, lowerKeyword .. "(%w+)") and string.find(lowerMessage, "(%w+)" .. lowerKeyword) end +function GetFormattedShopCategoryNames(itemsTable) + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + if #formattedCategoryNames > 1 then + local lastCategory = table.remove(formattedCategoryNames) + return table.concat(formattedCategoryNames, ", ") .. " and " .. lastCategory + else + return formattedCategoryNames[1] or "" + end +end + +function Npc:getRemainingShopCategories(selectedCategory, itemsTable) + local remainingCategories = {} + for categoryName, _ in pairs(itemsTable) do + if categoryName ~= selectedCategory then + table.insert(remainingCategories, "{" .. categoryName .. "}") + end + end + return table.concat(remainingCategories, " or ") +end + -- Npc talk -- npc:talk({text, text2}) or npc:talk(text) function Npc:talk(player, text) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index b8eb94346d7..ee96b5bba24 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -1888,7 +1888,7 @@ bool Player::openShopWindow(std::shared_ptr npc, const std::vectorisShopPlayer(getGUID())) { + if (npc->isShopPlayer(getGUID()) && npc->getShopItemVector(getGUID()).size() == shopItems.size()) { g_logger().debug("[Player::openShopWindow] - Player {} is already in shop window", getName()); return false; } diff --git a/src/lua/functions/creatures/npc/npc_functions.cpp b/src/lua/functions/creatures/npc/npc_functions.cpp index 3a161ba3501..b18814cdae7 100644 --- a/src/lua/functions/creatures/npc/npc_functions.cpp +++ b/src/lua/functions/creatures/npc/npc_functions.cpp @@ -352,6 +352,7 @@ int NpcFunctions::luaNpcOpenShopWindow(lua_State* L) { return 1; } + player->closeShopWindow(); pushBoolean(L, player->openShopWindow(npc)); return 1; } @@ -402,6 +403,7 @@ int NpcFunctions::luaNpcOpenShopWindowTable(lua_State* L) { } lua_pop(L, 3); + player->closeShopWindow(); pushBoolean(L, player->openShopWindow(npc, items)); return 1; }