Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

descrepency in running clang-tidy from console vs qt creator



  • I am working on integrating clang-tidy into my project. I am able to use clang-tidy perfectly within inside qt creator. The problem i run into is running it outside of qt creator. The output of clang-tidy shows like 1000+ warnings on one file I assume this is related to the moc files but am not sure. Does anyone know of a way to determine the command that qt creator calls when running clang-tidy.

    here is my console command

    run-clang-tidy -checks=-*,bugprone-*,clang-*,concurrency-*,cppcoreguidelines-*,-cppcoreguidelinges-owning-memory,google-*,-google-readability-braces-around-statements,modernize-*,-modernize-use-nodiscard,-modernize-use-trailing-return-type,performance-* > radiant_scp_clang -header-filter=.* -p ./builds/0.1.0/Qt5.15.0/gcc_64/Debug/ libs/Common/src/API/Digests/base_digest.cpp 
    9476 warnings generated.
    18953 warnings generated.
    Suppressed 18935 warnings (18926 in non-user code, 9 NOLINT).
    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
    9476 warnings generated.
    18953 warnings generated.
    Suppressed 18935 warnings (18926 in non-user code, 9 NOLINT).
    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
    

    A ton of warnings are generated. vs. running in qt creator i get this

    77dd068a-246b-447b-a479-2ae10d17a0ca-image.png

    any help would be greatly appreciated.


Log in to reply