C++ static analysis tool

Discussion in 'C++' started by Fredrik Eriksson, Oct 14, 2009.

  1. I’m responsible for the C++ developer discipline at the company I work
    at, and I’m trying to shape up the quality of our code base, at least
    for new developed code. Static analysis will be one step among others,
    like unit test and cross compiling.

    I really like the idea of an automatic check for conformance to C++
    and our code style. This will mainly be used by the developer during
    his/hers realization as a support, but also as a review and quality
    assurance, along with unit test reports, by the project leader (or
    other).

    The criteria that I’m looking for is:

    * Standard Conformance (this will be addressed with cross-compile, so
    it’s not necessary)
    * “Best practice”-checks (least amount of scope for a variable, no C-
    casts and so on)
    * Able to choose witch tests that will run (configure for our needs)
    * Code style-checks (indentations, comments and so on).
    * Able to write our own checks.

    I have looked at Rose Compiler and the tool Compass. For what I can
    understand it fulfills all the criteria that I’m looking for, and then
    some… The only problem is that our build-, test- and production-
    environment is Solaris, and Rose doesn’t seem to support Solaris, at
    least as Rose is dependent on EDG, and the shipped EDG binaries is not
    targeted for Solaris and Spark. I did try to build Rose anyway,
    thinking I’ll sort the EDG problem later, but I could not even get
    past the configure, I had to hack the configure script just to get it
    to recognize that the platform was Sun Solaris, so in my book Solaris
    is not supported by Rose Compiler (given that my experience with
    installing these things are quite limited…)

    My questions are:

    Are there any others that have successfully used Rose Compiler and
    Compass on Solaris?

    Do you recommend any other C++ Static Analysis tool? Preferable open
    source, but it will do with a proprietary also.

    Thanks in advance

    /Fredrik
     
    Fredrik Eriksson, Oct 14, 2009
    #1
    1. Advertising

  2. Fredrik Eriksson wrote:
    > [..]
    >
    > My questions are:
    >
    > Are there any others that have successfully used Rose Compiler and
    > Compass on Solaris?


    Why don't you ask this in a Solaris newsgroup?

    > Do you recommend any other C++ Static Analysis tool? Preferable open
    > source, but it will do with a proprietary also.


    I've worked on large codebases for the last umpteen years, and not in
    one place we had time or the effort to employ a tool, and not for the
    lack of trying. None suited us. So we have always used peer reviews
    and periodic random [ahem!] code checks against the company standards
    with subsequent public flogg^H^H^H^H^Hpresentation.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Oct 14, 2009
    #2
    1. Advertising

  3. Fredrik Eriksson

    Ian Collins Guest

    Fredrik Eriksson wrote:
    >
    > Do you recommend any other C++ Static Analysis tool? Preferable open
    > source, but it will do with a proprietary also.


    The mark one eyeball. If you can't get by with peer review and unit
    tests, you are probably in trouble.

    If you want to enforce a common style, do it through a common editor
    configuration.

    --
    Ian Collins
     
    Ian Collins, Oct 14, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carlos

    static analysis tool for c++

    Carlos, Aug 3, 2005, in forum: C++
    Replies:
    5
    Views:
    471
    dennis
    Aug 7, 2005
  2. Brendon Costa
    Replies:
    0
    Views:
    814
    Brendon Costa
    Nov 3, 2007
  3. michael  scovetta
    Replies:
    2
    Views:
    1,151
    michael scovetta
    Oct 15, 2008
  4. ssubbarayan
    Replies:
    5
    Views:
    2,423
    Dave Hansen
    Nov 3, 2009
  5. Joe Kesselman
    Replies:
    0
    Views:
    924
    Joe Kesselman
    Sep 28, 2011
Loading...

Share This Page