diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-11 20:57:43 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-11 20:57:43 +0100 |
commit | 5aeb8407bddc80d0c57ab30b22ced823eca1d29a (patch) | |
tree | 369a5f293eec1968404b521592617650660618b5 | |
parent | Don't define function in header, also use string_view to avoid copying (diff) | |
download | gentoobrowse-api-0.12.2.tar.bz2 gentoobrowse-api-0.12.2.tar.xz gentoobrowse-api-0.12.2.zip |
Enable all cppcheck checks and fixupgentoobrowse-api-0.12.2
-rw-r--r-- | Jamroot.jam | 38 | ||||
-rw-r--r-- | gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp | 4 | ||||
-rw-r--r-- | gentoobrowse-api/service/maintenance/updatesProcessor.cpp | 5 |
3 files changed, 25 insertions, 22 deletions
diff --git a/Jamroot.jam b/Jamroot.jam index 8a29f49..43ac49b 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -33,32 +33,36 @@ project <toolset>gcc,<variant>debug:<cflags>-Wlogical-op <toolset>gcc,<variant>debug:<cflags>-Wuseless-cast <variant>coverage:<coverage>on + <toolset>tidy:<enable>all <toolset>tidy:<define>ICE_IGNORE_VERSION <toolset>tidy:<define>ICE_MEMBER_IMPORT_EXPORT - <toolset>tidy:<exclude>users.cpp - <toolset>tidy:<exclude>user-models.cpp - <toolset>tidy:<exclude>slicer-user-models.cpp - <toolset>tidy:<exclude>news-models.cpp - <toolset>tidy:<exclude>slicer-news-models.cpp <toolset>tidy:<exclude>extended-models.cpp - <toolset>tidy:<exclude>slicer-extended-models.cpp - <toolset>tidy:<exclude>portage-models.cpp - <toolset>tidy:<exclude>slicer-portage-models.cpp - <toolset>tidy:<exclude>portage.cpp <toolset>tidy:<exclude>gb-base.cpp - <toolset>tidy:<exclude>maintenance.h + <toolset>tidy:<exclude>gentoobrowse-api/api/bin/tidy/debug/checker-cppcheck/cxxstd-20-iso/maintenance.h + <toolset>tidy:<exclude>gentoobrowse-api/domain/bin/slicer-yes/extended-models.h + <toolset>tidy:<exclude>gentoobrowse-api/domain/bin/slicer-yes/portage-models.h + <toolset>tidy:<exclude>gentoobrowse-api/domain/bin/slicer-yes/user-models.h + <toolset>tidy:<exclude>gentoobrowse-api/domain/bin/unpackPqTextArray.cpp <toolset>tidy:<exclude>maintenance.cpp - <toolset>tidy:<exclude>notifications.h + <toolset>tidy:<exclude>news-models.cpp <toolset>tidy:<exclude>notifications.cpp - <toolset>tidy:<exclude>notifications/xslt/base.h + <toolset>tidy:<exclude>notifications/css/style.cpp + <toolset>tidy:<exclude>notifications/css/style.h + <toolset>tidy:<exclude>notifications.h <toolset>tidy:<exclude>notifications/xslt/base.cpp - <toolset>tidy:<exclude>notifications/xslt/news.h + <toolset>tidy:<exclude>notifications/xslt/base.h <toolset>tidy:<exclude>notifications/xslt/news.cpp - <toolset>tidy:<exclude>notifications/xslt/signup.h + <toolset>tidy:<exclude>notifications/xslt/news.h <toolset>tidy:<exclude>notifications/xslt/signup.cpp - <toolset>tidy:<exclude>notifications/css/style.h - <toolset>tidy:<exclude>notifications/css/style.cpp - <toolset>tidy:<exclude>unpackPqTextArray.cpp + <toolset>tidy:<exclude>notifications/xslt/signup.h + <toolset>tidy:<exclude>portage.cpp + <toolset>tidy:<exclude>portage-models.cpp + <toolset>tidy:<exclude>slicer-extended-models.cpp + <toolset>tidy:<exclude>slicer-news-models.cpp + <toolset>tidy:<exclude>slicer-portage-models.cpp + <toolset>tidy:<exclude>slicer-user-models.cpp + <toolset>tidy:<exclude>user-models.cpp + <toolset>tidy:<exclude>users.cpp <toolset>tidy:<checkxx>boost-* <toolset>tidy:<checkxx>bugprone-* <toolset>tidy:<xcheckxx>bugprone-implicit-widening-of-multiplication-result diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp index 441f46f..b317bf5 100644 --- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp @@ -73,7 +73,7 @@ namespace Gentoo::Service { const Glib::ustring pv = fn[3]; if (packageVersion->match(pv, matches)) { U::EbuildCacheParser ecp(path); - const std::string categoryName = fn[2]; + const std::string & categoryName = fn[2]; const std::string packageName = matches.fetch(1); const std::string ebuildVersion = matches.fetch(2); @@ -296,7 +296,7 @@ namespace Gentoo::Service { Glib::MatchInfo matches; const Glib::ustring pv = fn[3]; if (packageVersion->match(pv, matches)) { - const std::string categoryName = fn[2]; + const std::string & categoryName = fn[2]; const std::string packageName = matches.fetch(1); const std::string ebuildVersion = matches.fetch(2); diff --git a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp index b6bcee2..3295f54 100644 --- a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp @@ -58,8 +58,7 @@ namespace Gentoo::Service { categoryInsert(sql::maintenance::categoryInsert.modify(db)), packageInsert(sql::maintenance::packageInsert.modify(db)), findPackage(sql::portage::findPackage.select(db)), - updatesMoveUserPackages(sql::maintenance::updatesMoveUserPackages.modify(db)), changes(nullptr), - updatePacks("updatePack") + updatesMoveUserPackages(sql::maintenance::updatesMoveUserPackages.modify(db)), updatePacks("updatePack") { this->src = Utils::Database::emptyClone(db, "gentoobrowse.updates"); this->dest = "gentoobrowse.updates"; @@ -92,7 +91,7 @@ namespace Gentoo::Service { DB::ModifyCommandPtr packageInsert; DB::SelectCommandPtr findPackage; DB::ModifyCommandPtr updatesMoveUserPackages; - ChangeSet * changes; + ChangeSet * changes {}; Utils::EntityWhereFilter<std::string> updatePacks; void |