Integrating with Structure101

Structure101 is a third-party code visualization and organization tool that helps you to improve the organization and structure of your codebase. By visualizing your codebase, you can not only understand your code better and decrease its complexity, you can also measure your improvements and compare your progress over time.

Klocwork integrates with Structure101 (via the kwstruct101 command) by generating Structure 101 archive files from the raw output of your analysis. You can import the archive files directly into Structure101. You should run kwstruct101 on the output of your analysis regularly, and you should take the time to view the project in Structure101 as part of your ongoing analysis work. Decreasing the complexity of your codebase goes a long way towards improving the overall reliability of your application.

Structure101 is available for download from the Klocwork. Download the Structure101 installer from https://library.roguewave.com/display/SUPPORT/Klocwork+-+Product+Downloads. This installer was created specifically for use with Klocwork. Contact Customer Support for product licensing information.

To generate a Structure101 project:

  1. Perform your integration build analysis, or perform an incremental analysis on your codebase.
  2. Run the kwstruct101 command specifying the tables directory in your project source tree. The tables directory is generated as part of the analysis.

    In the following example, the kwstruct101 command takes the tables folder as input and generates a structure101 archive file calledmy_proj.kw

     kwstruct101 --tables-directory "C:\my_projects\npp\tables" --license-host lic_server --output my_proj.kw
    
  3. In Structure101, click File > New, then in the New Project dialog, in the KW file: field, specify the location of the generated archive file that you just created. Follow the steps in the wizard to create the new project.

Remember to run your incremental analysis frequently and use kwstruct101 to generate a new structure101 archive file. Take the time to view your generated project file in Structure101 in order to monitor the organization of your project.

For more information about Structure101, see the Structure101 Documentation.