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 ?
Forum Updated to NodeBB v4.3 + New Features

Good static code analysis tool ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 5 Posters 6.6k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    Andy314
    wrote on 17 Apr 2017, 07:03 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.

    M A 2 Replies Last reply 17 Apr 2017, 07:11
    0
    • A Andy314
      17 Apr 2017, 07:03

      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.

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 17 Apr 2017, 07:11 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/

      A 1 Reply Last reply 17 Apr 2017, 16:16
      3
      • M mrjj
        17 Apr 2017, 07:11

        @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/

        A Offline
        A Offline
        Andy314
        wrote on 17 Apr 2017, 16:16 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 ?

        M 1 Reply Last reply 17 Apr 2017, 17:50
        0
        • A Andy314
          17 Apr 2017, 16:16

          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 ?

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 17 Apr 2017, 17:50 last edited by
          #4

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

          A 1 Reply Last reply 18 Apr 2017, 06:12
          6
          • M mrjj
            17 Apr 2017, 17:50

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

            A Offline
            A Offline
            Andy314
            wrote on 18 Apr 2017, 06:12 last edited by
            #5

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

            J 1 Reply Last reply 18 Apr 2017, 08:32
            0
            • A Andy314
              18 Apr 2017, 06:12

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

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 18 Apr 2017, 08:32 last edited by
              #6

              @Andy314 What QtCreator version do you use?

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

              A 1 Reply Last reply 18 Apr 2017, 08:45
              1
              • J jsulm
                18 Apr 2017, 08:32

                @Andy314 What QtCreator version do you use?

                A Offline
                A Offline
                Andy314
                wrote on 18 Apr 2017, 08:45 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

                J 1 Reply Last reply 18 Apr 2017, 08:47
                0
                • A Andy314
                  18 Apr 2017, 08:45

                  @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

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 18 Apr 2017, 08:47 last edited by
                  #8

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

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

                  A 1 Reply Last reply 18 Apr 2017, 08:50
                  0
                  • J jsulm
                    18 Apr 2017, 08:47

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

                    A Offline
                    A Offline
                    Andy314
                    wrote on 18 Apr 2017, 08:50 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 6 Jun 2018, 13:02 last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • A Andy314
                        17 Apr 2017, 07:03

                        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 16 Feb 2021, 20:04 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