gnu-indent
« Back to VersTracker
Description:
C code prettifier
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c formatting code-style developer-tools cpp
Install: brew install gnu-indent
About:
GNU Indent is a command-line utility designed to format C source code according to a specified coding style. It parses C code and reformats it, enhancing readability and maintaining consistent structure across projects. The tool is highly configurable, allowing developers to define custom indentation, spacing, and brace placement rules.
Key Features:
  • Supports multiple coding styles (K&R, ANSI, GNU)
  • Highly customizable formatting rules via command-line flags
  • Can format code in place or output to a new file
  • Handles both C and C++ source files
Use Cases:
  • Standardizing code style across a legacy C/C++ codebase
  • Automating code formatting in build pipelines
  • Preparing code for review to ensure consistency
Alternatives:
  • clang-format – More modern, supports more languages, and integrates better with IDEs.
  • astyle – Artistic Style is another popular formatter with similar features and style options.
Version History
Detected Version Rev Change Commit