Uncrustify

Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA

Version

0.66.1

Runtime

Alpine Linux 3.7

Supported Languages

C C++ C# Objective-C Java

Note: Uncrustify itself also supports D, Pawn and VALA, however, Inspecode does NOT support them as of now.

Official Documentation

http://uncrustify.sourceforge.net/

YAML Configuration

uncrustify:

  • input:

    Patterns to include in execution and reports.

  • ignore:

    Patterns to exclude from execution and reports.

  • auto-fix:

    true/false

    true implies --no-backup option, and false implies --check option.

  • config-file:

    Alias of -c option.

  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.25 CPU with 960 MiB RAM.

  • options:

    Below is the list of options that are supported:

    Basic Options:
      -c CFG       : Use the config file CFG.
      --mtime      : Preserve mtime on replaced files.
  • experimental:

    • incremental:

      true/false

      Note: The incremental analysis is disabled if any kinds of configuration files are changed. The files recognized as configuration files are as follows:

YAML Examples

  • With default options:

    inspecode:
      uncrustify: default
  • With enabling auto-fixing and default options:

    inspecode:
      uncrustify: auto-fix
  • With custom machine:

    inspecode:
      uncrustify:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
  • With custom options:

    inspecode:
      uncrustify:
        auto-fix: true
        options: [--mtime]
  • With a configuration file:

    inspecode:
      checkstyle:
        config-file: ./my-uncrustify.cfg

    The above configuration is equivalent to:

    inspecode:
      checkstyle:
        options:
          -c: ./my-uncrustify.cfg

Configuration File Detection

If no configuration files are specified via config-file or options field, such as when using default built-in configuration, Inspecode specifies the default configuration file to Uncrustify by default since Uncrustify always requires a configuration file via -c option.

results matching ""

    No results matching ""