3

Could you suggest some open source tools that analyze C++ code and checks the following rules:

  • naming conventions,
  • file inclusions,
  • function design,
  • data types,
  • flow control,
  • memory allocation,
  • file handling,
  • portable code,
  • runs under Solaris or SUSE
Kara
  • 5,650
  • 15
  • 48
  • 55
eklmp
  • 201
  • 3
  • 9
  • 5
    Please add some formatting to your question. Recommend a bulleted list for "naming conventions [...] portable code." For each bullet, please consider providing an example; something like "\n - **file inclusions**: verify that `#include`s occur alphabetically\n". This will help make it clearer what you're after. My guess is that there is no one tool that does all these things. – phooji Mar 02 '11 at 06:20
  • I've fixed as much as the formatting and stuff as I could to make this vaguely coherent, though it would be great if the OP would add some examples like @phooji mentioned. – Jonathan Sterling Mar 02 '11 at 07:26
  • Not an exact duplicate, but have you checked http://stackoverflow.com/questions/141498/ ? – Björn Pollex Mar 02 '11 at 07:42

3 Answers3

1

http://www.google.com/search?q=misra+checker

Of course, if the rules you're trying to enforce don't exactly match someone else's idea of a coding standard, no existing tool is going to work.

Ben Voigt
  • 260,885
  • 36
  • 380
  • 671
1

It is still in early development (especially for C++) but its improving rapidly and is a really interesting open source project in a vibrant community. So see if the CLang Static Analyzer does what you need.

Fabio Fracassi
  • 3,421
  • 1
  • 14
  • 17
0

I have used coverity (http://coverity.com/)in my organization. It does static bug check analysis and I found it to be very useful. It is highly customization and provides a number of checks. I am not entirely sure if it works on solaris or not but I would recommend checking it out.

user640121
  • 121
  • 1
  • 1
  • 5