Difference between revisions of "ITK/Release 4/Coding Style/KWStyle"
|Line 38:||Line 38:|
Revision as of 13:17, 3 January 2011
Download via Git from
git clone git://public.kitware.com/KWStyle.git
- Configure with CMake
- Default options should do just fine
mkdir ~/bin/KWStyle cd ~/bin/KWStyle ccmake ~/src/KWStyle
for convienence do:
if you want to install it in $HOME/local
and also configure it to build for Release:
make make install
Use from ITK
Rerun CMake in your ITK build.
Turn ON the flag:
Indicate where the KWStyle executable is located. For example, if you installed it as suggested above, then set:
and finally, set your favorite format for error reporting.
The options are:
This will allow you to run KWStyle from your development environment and process the style errors just the same way that you manage compilation errors.
For example, if you are a fortunate enough to be a user of Vim, you can do:
cd $ITK_BINARY_DIR vim
and from inside the editor type
if any errors are reported, the relevant files will be open inside the editor, just the same way as if C++ compilation errors had occurred during a normal build.
If you are not familiar with the Vim mode for "edit-compile-edit cycle", do yourself a favor and read:
It will change your life.
An additional target for coding style is
You can also run the Style checks as tests by doing from the command line:
ctest -R KWStyleCodeTest -V
ctest -R KWStyleReviewTest -V