Uncrustify – highly configurable source code formatter

Uncrustify is a source code formatter that helps developers maintain consistent coding conventions. It supports C, C++, C#, Objective-C, D, Java, Pawn and Vala, providing extensive control over the appearance and layout of source files.

The software offers hundreds of configuration options covering whitespace, indentation, alignment, line breaks and the placement of braces. This flexibility allows projects to adopt detailed coding standards rather than relying on a small selection of predefined styles.

Uncrustify works from the command line and can process individual files or collections of source code. Configuration files can be shared among team members, helping maintain consistent formatting across contributors and development environments.

This is free and open source software.

Key Features

  • Formatting support for C, C++, C#, Objective-C, D, Java, Pawn and Vala.
  • Extensive configuration options for defining coding conventions.
  • Add or remove whitespace around operators, parentheses and other constructs.
  • Control indentation for functions, classes, namespaces and conditional statements.
  • Configure brace placement and the use of braces around statements.
  • Manage blank lines and line breaks between code constructs.
  • Align variable declarations, function parameters and structure initialisers.
  • Control spacing and alignment in comments.
  • Configure formatting rules for preprocessor directives.
  • Apply consistent formatting to individual source files or multiple files.
  • Shared configuration files for enforcing project-specific styles.
  • Display available settings and generate configuration templates.
  • Update older configuration files to include newly introduced options.
  • Command-line operation suitable for automated formatting workflows.
  • Cross-platform support – runs on Linux, macOS, and Windows.

Website: github.com/uncrustify/uncrustify
Support:
Developer: Uncrustify contributors
License: GNU General Public License v2.0

Uncrustify is written in C and C++. Learn C with our recommended free books and free tutorials. Learn C++ with our recommended free books and free tutorials.


Related Software

C and C++ Linters
OCLintStatic code analysis tool for improving quality and reducing defects
cpplintStatic code checker for C++
CodeCheckerPlatform for running static analysers and managing code defects
UncrustifySource code beautifer
InferStatic analyser that detects bugs in Java, C and C++ code
Include What You UseSource analysis tool for C and C++ projects built on Clang
CppcheckStatic analysis tool for C/C++ code
flawfinderScans C and C++ source code for potential security weaknesses
clazyQt-focused static analyser that catches common C++ mistakes
ClangFormatCode formatting tool
Clang-TidyClang-based C++ “linter” tool
SmatchStatic analysis tool for finding defects in C code
CoccinelleSemantic patching tool for analysing and transforming C code

Read our verdict in the software roundup.

C# Code Formatters
UncrustifyHighly configurable source code beautifier supporting many languages
Artistic StyleFlexible source code indenter and formatter for C, C++, C# and Java
CSharpierOpinionated C# formatting with zero configuration
ClangFormatAutomatically formats C, C++, Java and other source code consistently

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted