Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #67889

Re: What is easiest to use static C++ code analyser?

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: What is easiest to use static C++ code analyser?
Date 2019-08-23 08:42 +1200
Message-ID <gs8d10F3s0U1@mid.individual.net> (permalink)
References <hfz7F.36165$Xs5.15669@fx06.am4>

Show all headers | View raw


On 23/08/2019 04:18, Szyk Cech wrote:
> Hello!
> 
> I want follow advises of great book: "Testen in Scrum-Projekten" by Tilo
> Linz. One of his advises which I consider easy to make is use static
> code analyser to check if programmers respect coding rules.
> 
> I am looking for C++ code analyser but I am interested with such tool
> for Java Script or Bash also.
> 
> I found great wiki page with list of most popular static code analysers:
> 
> https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis
> 
> but I have no time to try all of them.
> So maybe you have some experience with those tools if so:
> Please answer me to question:
> 
> What is easiest to use static C++ code analyser?

We use two, Cppcheck and clang-tidy.

Cppcheck is reasonably fast, so we run it on every build. It spots a 
good number of problems, it categories issues as Error, Warning, Style, 
Performance, Portability and Information.  You can filter based on 
category or specific warning.

clang-tidy is much slower (we run it as a separate job) because it digs 
much deeper into the code and can follow control flow paths.  It has an 
extensive list of warnings, many of which can be automatically repaired. 
  See <http://clang.llvm.org/extra/clang-tidy/index.html#using-clang-tidy>

Both can be run in parallel, which speed things along if you have the 
hardware.

HTH,

-- 
Ian.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What is easiest to use static C++ code analyser? Szyk Cech <szykcech@spoko.pl> - 2019-08-22 18:18 +0200
  Re: What is easiest to use static C++ code analyser? David Brown <david.brown@hesbynett.no> - 2019-08-22 20:04 +0200
  Re: What is easiest to use static C++ code analyser? Ian Collins <ian-news@hotmail.com> - 2019-08-23 08:42 +1200
  Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-22 23:38 +0000
  Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-22 23:38 +0000
  Re: What is easiest to use static C++ code analyser? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-25 06:09 +0000
  Re: What is easiest to use static C++ code analyser? Jens Kallup <jkallup@web.de> - 2019-08-28 15:57 +0200
    Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-28 18:18 +0000
      Re: What is easiest to use static C++ code analyser? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-28 19:22 +0000
        Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-08-28 20:00 +0000
          Re: What is easiest to use static C++ code analyser? David Brown <david.brown@hesbynett.no> - 2019-08-28 22:21 +0200
            Re: What is easiest to use static C++ code analyser? legalize+jeeves@mail.xmission.com (Richard) - 2019-09-03 20:17 +0000
              Re: What is easiest to use static C++ code analyser? David Brown <david.brown@hesbynett.no> - 2019-09-04 09:03 +0200
          Re: What is easiest to use static C++ code analyser? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-29 09:58 +0000
  Re: What is easiest to use static C++ code analyser? Bonita Montero <Bonita.Montero@gmail.com> - 2019-09-04 10:44 +0200

csiph-web