Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Good static code analysis tool ?
QtWS25 Last Chance

Good static code analysis tool ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 5 Posters 6.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by Andy314
    #1

    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.

    mrjjM A 2 Replies Last reply
    0
    • Andy314A Andy314

      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.

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Andy314
      Hi
      I find it worth to use. Can find potentiel errors and out of bounds situations.
      Not tried it with Creator but this
      http://cppcheck.sourceforge.net/
      was easy to use and understand but
      might not cover all cases u want
      https://sourceforge.net/p/cppcheck/wiki/ListOfChecks/

      Andy314A 1 Reply Last reply
      3
      • mrjjM mrjj

        @Andy314
        Hi
        I find it worth to use. Can find potentiel errors and out of bounds situations.
        Not tried it with Creator but this
        http://cppcheck.sourceforge.net/
        was easy to use and understand but
        might not cover all cases u want
        https://sourceforge.net/p/cppcheck/wiki/ListOfChecks/

        Andy314A Offline
        Andy314A Offline
        Andy314
        wrote on last edited by Andy314
        #3

        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 ?

        mrjjM 1 Reply Last reply
        0
        • Andy314A Andy314

          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 ?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Andy314A 1 Reply Last reply
          6
          • mrjjM mrjj

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

            Andy314A Offline
            Andy314A Offline
            Andy314
            wrote on last edited by
            #5

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

            jsulmJ 1 Reply Last reply
            0
            • Andy314A Andy314

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

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Andy314 What QtCreator version do you use?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              Andy314A 1 Reply Last reply
              1
              • jsulmJ jsulm

                @Andy314 What QtCreator version do you use?

                Andy314A Offline
                Andy314A Offline
                Andy314
                wrote on last edited by
                #7

                @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

                jsulmJ 1 Reply Last reply
                0
                • Andy314A Andy314

                  @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

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

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

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  Andy314A 1 Reply Last reply
                  0
                  • jsulmJ jsulm

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

                    Andy314A Offline
                    Andy314A Offline
                    Andy314
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      anilkumar31509
                      wrote on last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • Andy314A Andy314

                        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.

                        A Offline
                        A Offline
                        Andrey_Karpov
                        wrote on last edited by
                        #11

                        @Andy314 Try PVS-Studio tool - https://www.viva64.com/en/pvs-studio/
                        PVS-Studio is a tool for detecting bugs and security weaknesses in the source code of programs, written in C, C++, C# and Java. It works under 64-bit systems in Windows, Linux and macOS environments, and can analyze source code intended for 32-bit, 64-bit and embedded ARM platforms.
                        Example: 77 Defects in Qt 6 - https://www.viva64.com/en/b/0801/

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved