19

Are there any good plugins for static code analysis for Eclipse CDT? I found two so far:

  • Cppcheck plugin, but this still needs the original cppcheck executable
  • CppChecker, but this didn't work (it didn't do anything)

Are there any more that are better? Or how do I get CppChecker to do something (or is it a static code analyiser at all? the website is not clear at all)?

blubberbernd
  • 3,641
  • 8
  • 35
  • 46

3 Answers3

8

There is another called "Codan," stands for CODe ANalysis.

It can be reviewed at this wiki, with links to the tool:

http://wiki.eclipse.org/CDT/designs/StaticAnalysis

I cannot answer whether this is the better than your list, but at least it's another option you can review. Eclipse integration seems to be its only requirement.

Keep in mind that this is a work in progress, but given its goals, it may suit your short-term needs.

Rick
  • 699
  • 1
  • 6
  • 17
  • I found this, too, but didn't find a link to the installation site... On some points on the website it is said that it's already included in CDT, but it's definitly not. – blubberbernd Apr 04 '11 at 16:37
  • 1
    Ah, I found it after a long search. You have to add the CDT Update site into the plugin installer and there you can select Codan for installing. But it has less features than cppcheck, by far! – blubberbernd Apr 04 '11 at 19:12
  • Good to know. I'll have to look into cppcheck. Thanks for the post! – Rick Apr 05 '11 at 01:27
  • 3
    This is a bit of a late reply: but the new Eclipse Indigo includes and uses Codan by default, so that adds a lot of improvement. – Mathiasdm Aug 07 '11 at 12:30
  • Codan seems to be a framework/structure for "concrete" checkers to fit into. For example, I imagine you can get Lint checking your Eclipse project code via Codan. I thought this question was more about alternatives to Lint than about a meta-checker like Codan... anyone agree? – aaaidan Sep 19 '12 at 03:11
2

You can always run lint inside Eclipse as well. I wrote up a blog entry on doing it manually. However, there also exists Visual Lint and it works in VS and Eclipse. It's not perfect but it's easier than setting it all up manually.

Tod
  • 8,192
  • 5
  • 52
  • 93
0

I suggest a free plugin based on Codan framework called Artemis. You can get it from ecliplse marketplace. There are other checkers but only plugins integrated into Codan, like this one, can perform real-time analysis in Eclipse.

greywolf82
  • 21,813
  • 18
  • 54
  • 108