Good static code analysis tool ?

  • Hello,
    I will try out some helper tools for C++ development. I discovered the area of "static code analysis".
    Has someone experiences with such tools. Is it worth to use ?
    What are good tools (maybe with integration in the Creator) ?
    Analyzing of code-metrics and detection of potential errors is a needed feature.

  • Qt Champions 2016

    I find it worth to use. Can find potentiel errors and out of bounds situations.
    Not tried it with Creator but this
    was easy to use and understand but
    might not cover all cases u want

  • Hi @mrjj
    I have tested CppChecker with a part of my code and it has found some not initialized variables, performance issues (constructor body) and so on. Therfore I think its is worth to use a checker.
    The CppChecker Gui is not very comfortable - I would like to edit it in the QtCreator directly. I found in a documentation that the Clang Static Analyser link text can work with the QtCreator, but this plugin is not installed in my version. In the docu it look for me that this is a standard part of the Creator !?
    Can I get it with the maintenance tool - any experiementce with this plug-in ?

  • Qt Champions 2016

    Please check in Help Menu -> About plugins thats its enabled
    alt text

  • @mrjj
    I have not the entry "ClangStaticAnalyser". Instead of it I have "AnalyserBase" from the Qt Company.

  • Moderators

    @Andy314 What QtCreator version do you use?

  • @jsulm
    Qt Creator 3.6.1
    Based on Qt 5.6.0 (MSVC 2013, 32 bit)

    Built on Mar 14 2016 09:57:09

    From revision d502727b2c

  • Moderators

    @Andy314 You should update to the newest version if possible.

  • @jsulm
    Thank you for your help.
    That is on my plan - I will check it in the new version.

Log in to reply