Installing the Uncrustify source code formatter for Teracloud® Streams

When you generate C++ code using the sc command, Teracloud® Streams can use the Uncrustify source code formatter to ensure that the generated code is indented and formatted correctly. Installing and using the Uncrustify source code formatter with Teracloud® Streams is optional.

If you specify the code beautification option (-z) when you compile your code, and the Uncrustify software is not installed, the following message is displayed:
CDISP9094W WARNING: The 'uncrustify' code formatter could not be found.
Compilation is continuing without formatting. 

Procedure

  1. Download the Uncrustify source code formatter from the Uncrustify website.
  2. Install the source code formatter by using the instructions on the Uncrustify website.
  3. Edit the Uncrustify configuration file that is provided by Teracloud® Streams.

    The uncrustify.verbose.cfg file is included in the Teracloud® Streams installation. You can edit this file to customize the formatting. This file is in the product-installation-root-directory/7.2.0.0/etc/uncrustify directory. For more information about modifying the configuration file, go to the Uncrustify website.

    Note: Source code formatting can introduce an error in the generated C++ code. If you specify the code beautification option (-z) when you compile your code and an error is displayed when you compile the generated C++ code, try compiling your code without the -z option to ensure that the error is not introduced by the source code formatter.