Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ToolSourceUsageRules Profile / Needed scripts
cpplint

Home Page

Download Tool

Create the rules profile and the modified cpplint python script as follow:

    • python cpplint_createrules.py cpplint.py

This will generate the following files:

    • cpplint.xml that should installed in extensions/rules/cxxexternal
    • cpplint_mod.py that should be used to check the code

After this you can run the cpplint_mod.py against any source file like this:

    • python cpplint_mod.py source.cpp 2> report.txt

The output file report.txt needs to be converted to xml format described above. For convenience a perl script is available here and can be run as follow:

    • perl cpplintReport2checkstyleReport.perl report.txt cpplint-result-0.xml

 

 

Todo
Info

This is maintained by the community, so if you want to share additional rules profiles or tool do so by using the sonar user mailing list

 

...

Info

The list above is provided without any warranty, therefore you may need to debug the scripts or tools in order to make them work