Skip to content

Commit 3e0f410

Browse files
committed
2
1 parent 82a674f commit 3e0f410

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

lib/checkersreport.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,17 @@ std::string CheckersReport::getReport(const std::string& criticalErrors) const
197197
if (addonInfo.checkers.empty())
198198
continue;
199199
fout << std::endl << std::endl;
200-
fout << addonInfo.name << " checkers" << std::endl;
201-
fout << std::string(addonInfo.name.size() + 9, '-') << std::endl;
200+
std::string title;
201+
if (mSettings.premium && addonInfo.name == "premiumaddon.json")
202+
title = "Cppcheck Premium";
203+
else {
204+
title = addonInfo.name;
205+
if (endsWith(title, ".json"))
206+
title.erase(title.rfind('.'));
207+
}
208+
title += " checkers";
209+
fout << title << std::endl;
210+
fout << std::string(title.size(), '-') << std::endl;
202211

203212
for (const auto& checkReq: addonInfo.checkers) {
204213
const std::string& checker = checkReq.first;

0 commit comments

Comments
 (0)