ITK Procedure for Checking Style: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Hjmjohnson (talk | contribs) No edit summary |
|||
Line 6: | Line 6: | ||
* [[ITK_Release_4/Coding Style/KWStyle|ITKv4 KStyle]] | * [[ITK_Release_4/Coding Style/KWStyle|ITKv4 KStyle]] | ||
= Old Instructions = | |||
= <font color=red> The following are *Old Instructions* </font> = | |||
<font color=grey> | |||
= Get KWStyle = | = Get KWStyle = | ||
Line 57: | Line 60: | ||
* ITK_SOURCE_DIR : should be replaced with the path to the source irectory of ITK | * ITK_SOURCE_DIR : should be replaced with the path to the source irectory of ITK | ||
* filename : is the name of the file for which you are currently checking coding style | * filename : is the name of the file for which you are currently checking coding style | ||
</font> |
Revision as of 16:08, 16 April 2011
New Instructions
WARNING: This instructions have been deprecated with ITKv4. For new Instructions, please look at
The following are *Old Instructions*
Get KWStyle
- The Home Page of KWStyle is at http://public.kitware.com/KWStyle/
Downloading KWStyle
- Download KWStyle:
cvs -d:pserver:anoncvs@www.itk.org:/cvsroot/KWStyle login <CR> cvs -d:pserver:anoncvs@www.itk.org:/cvsroot/KWStyle co KWStyle
Building KWStyle
- Configure with CMake
- Build with your compiler
Configure your ITK Build
- Rerun CMake on you ITK Binary builds
Point to your KWStyle executable
- Provide the path to your KWStyle executable
Select error format
- The options are
- Formatting for VIM (the best editor)
- Formatting for Visual Studio (if you are a Windows victim)
Running KWStyle
From the command line
Use the following command
KWStyle -v -xml ITK_BINARY_DIR/ITK.kws.xml -o ITK_SOURCE_DIR/Utilities/KWStyle/ITKOverwrite.txt filename
Where
- -v : stands for Verbose
- -xml : is the file containing the description of the coding style in XML
- -o : is the file that contains exceptions to the kwstyle rules
- ITK_BINARY_DIR : should be replaced with the path to the binary directory where you build ITK
- ITK_SOURCE_DIR : should be replaced with the path to the source irectory of ITK
- filename : is the name of the file for which you are currently checking coding style