uncrustify

C, C++, C#, D, Java and Pawn source code formatter.

TLDR

Format a single file

>_ uncrustify -f [path/to/file.cpp] -o [path/to/output.cpp]
copy

Read filenames from stdin, and take backups before writing output back to the original filepaths

>_ find . -name "*.cpp" | uncrustify -F - --replace
copy

Don't make backups (useful if files are under version control)

>_ find . -name "*.cpp" | uncrustify -F - --no-backup
copy

Use a custom configuration file and write the result to stdout

>_ uncrustify -c [path/to/uncrustify.cfg] -f [path/to/file.cpp]
copy

Explicitly set a configuration variable's value

>_ uncrustify --set [option]=[value]
copy

Generate a new configuration file

>_ uncrustify --update-config -o [path/to/new.cfg]
copy

Copied to clipboard
free 100$ digital ocean credit