ITK Procedure for Checking Style: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 33: Line 33:
Use the following command
Use the following command


   KWStyle -v  -xml  ITK_DIR/ITK.kws.xml   filename
   KWStyle -v  -xml  ITK_BINARY_DIR/ITK.kws.xml -o ITK_SOURCE_DIR/Utilities/KWStyle/ITKOverwrite.txt  filename


Where  
Where  
Line 39: Line 39:
* -v : stands for Verbose
* -v : stands for Verbose
* -xml : is the file containing the description of the coding style in XML
* -xml : is the file containing the description of the coding style in XML
* ITK_DIR : should be replaced with the path to the binary directory where you build ITK
* -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
* filename : is the name of the file for which you are currently checking coding style

Revision as of 20:53, 9 December 2008

Get KWStyle

Downloading 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