Code review

From emboxit
Jump to: navigation, search


Reviewboard


Eclipse Codan



cppcheck

Cppcheck is an analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools, we don't detect syntax errors. Cppcheck only detects the types of bugs that the compilers normally fail to detect. The goal is no false positives.


Codelite

codelite is an open-source, cross platform IDE for the C/C++ programming languages (build and tested on Windows XP SP3, Windows 7, Ubuntu 11.10 / 12.04, and Mac OSX 10.5.8)


SublimeLinter

SublimeLinter Home

SublimeLinter is a plugin that supports "lint" programs (known as "linters"). SublimeLinter highlights lines of code the linter deems to contain (potential) errors. It also supports highlighting special annotations (for example: TODO) so that they can be quickly located.

    • Extensive explanation on how to use it
    • C/C++ - The default C/C++ linter is cppcheck, however Google's cpplint.py is also supported
    • More programming-languages supported

Add external linter (clang) to SublimeLinter

I've concocted a way to drop some user-made linters written for SublimeText 2 into the mix to get the linting working with SublimeLinter and ANSI C. Also note, this is a slightly 'hacky' way of getting it to work. You must have clang installed (for OS X you can use Apple's command line tools to install clang/the LLVM compiler, which requires only a developer account, which is free), you also must have SublimeLinter installed in Sublime Text 2 Navigate to this user's fork of SublimeLinter and proceed to download the 'c.py' module from the modules folder Copy this module into SublimeLinter's working modules directory located under **your SublimeText 2 data directory**\Packages\SublimeLinter\sublimelinter\modules\ (see this for further information on the data directory) Restart Sublime Text 2†

My winXP installation(nx)

  • Install the SublimeLinter package from Sublime menu
  • Update SublimeLinter user settings and install mode.js, as shown here: getting-sublimelinter-running-on-windows
  • Install Cppcheck from here: Cppcheck
    • This installs a standalone Cppcheck for windows
      • Obviously paths are updated and SublimeLinter detects where Cppcheck is
    • Hot keys
      • Pressing ctrl+alt+l runs SublimeLinter, ctrl+alt+e goes to next error, ctrl+alt+shift+e goes to previous error
      • Can change in this way: copy Key Bindings-Default to Key Bindings-User and then edit Key Bindings-User
      • My changes are alt+z, alt+x, alt+z


Unclasified


valgrind

Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools.

  • It seems there is no windows support