From cd056a4b5b72f0c2ed20f6af11f2f5cf782c5cfe Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 11 Mar 2020 16:50:56 +0000 Subject: [PATCH] uncrustify: add page (#3904) --- pages/common/uncrustify.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/uncrustify.md diff --git a/pages/common/uncrustify.md b/pages/common/uncrustify.md new file mode 100644 index 000000000..792e205c2 --- /dev/null +++ b/pages/common/uncrustify.md @@ -0,0 +1,28 @@ +# uncrustify + +> C, C++, C#, D, Java and Pawn source code formatter. +> More information: . + +- Format a single file: + +`uncrustify -f {{path/to/file.cpp}} -o {{path/to/output.cpp}}` + +- Read filenames from stdin, and take backups before writing output back to the original filepaths: + +`find . -name "*.cpp" | uncrustify -F - --replace` + +- Don't make backups (useful if files are under version control): + +`find . -name "*.cpp" | uncrustify -F - --no-backup` + +- Use a custom configuration file and write the result to stdout: + +`uncrustify -c {{path/to/uncrustify.cfg}} -f {{path/to/file.cpp}}` + +- Explicitly set a configuration variable's value: + +`uncrustify --set {{option}}={{value}}` + +- Generate a new configuration file: + +`uncrustify --update-config -o {{path/to/new.cfg}}`