Using Codan to perform the C + + analysis tool in eclipse

Source: Internet
Author: User
Keywords C++ eclipse codan
Tags aliyun analysis checker checks code code analysis developers development

Alex Ruiz explains why the update is good news for http://www.aliyun.com/zixun/aggregation/13428.html ">eclipse CDT user, and then shows how to use Java™ Code and a little XML quickly integrate your favorite code checker into the Eclipse c++/c++ development environment.

Codan is a code analysis framework that performs code checks on C/s + + projects. Since 2011, Codan has become part of the Eclipse CDT, which not only provides all the infrastructure needed to perform static code analysis, but also provides useful, ready-to-use problem checker.

Codan was updated in June 2012 with Eclipse Juno, enabling developers to automate external code analysis tools in Eclipse. This is an encouraging improvement for both the Eclipse CDT and C + + developers. Although the previously provided problem checker has performed well, it still needs to provide more Codan functionality that is in line with existing external code analysis tools. Codan can now easily integrate with mature external tools such as Cppcheck and Clang_check.

The ability to integrate external code analysis tools with Eclipse CDT can provide more and better code checks than developers can use Codan alone, and greatly improve the overall development productivity. We can now configure the external Code analysis tool from the Codan Preferences page. Once integrated with Codan, the tool can be automatically invoked to display its output in the form of an editor tag.

In this article, you will be shown how to integrate your favorite Code analyzer into your Eclipse C + + development environment using Java code and a little XML. My example is based on Cppcheck and Codan integration, but the process should also apply to the tools you choose.

Installing Eclipse Juno and CDT

To follow the examples in this article, you will need to install the Eclipse Juno and CDT. If you have not installed Eclipse, you can install a version with the CDT preinstallation program. To do this, simply select the Eclipse IDE for C + + developers from the Eclipse downloads page.

If you have installed an Eclipse that does not include the CDT, follow these instructions to update your development environment:

In Eclipse, select Menu Help > Install New Software .... In the Install dialog box, select Juno from the Drop-down list. In the Programming Languages directory, select the C + + Development Tools SDK.

Figure 1. Installing the CDT

In addition to the CDT, you need to install standard GNU/C + + development tools to compile, build, and debug your code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.