вс, 1 дек. 2019 г. в 19:43, Albert Astals Cid <aa...@kde.org>: > > El diumenge, 1 de desembre de 2019, a les 13:09:30 CET, Alexander Potashev va > escriure: > > > clang-tidy says that desktops in Task::Task and sessionStartTiMe in > > > Task::init should be const & > > > > Fixed these [1], however I wasn't able to run clang-tidy myself to get > > the same hints. Tried clang-tidy features in KDevelop and JetBrains' > > CLion. > > clang-tidy has a million checks and almost none are enabled by default (i > think) > > What i do is enable the performance ones manually, i.e. for example this is > what we have in the poppler CI > > cmake > -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" > .. > > But this will probably give you lots of errors you don't want, you have to > figure out which are th eones you care about.
Thanks! I managed to get that million of warnings by following this tutorial: http://mariobadr.com/using-clang-tidy-with-cmake-36.html Fixed some more, however some others would be nearly useless nitpicking. -- Alexander Potashev