1UNCRUSTIFY(1)                    User Commands                   UNCRUSTIFY(1)
2
3
4

NAME

6       uncrustify - C, C++, C#, D, Java and Pawn source code beautifier
7
8

SYNOPSIS

10       uncrustify [OPTIONS] [FILES]
11
12

DESCRIPTION

14       If no input files are specified, the input is read from stdin.
15       If reading from stdin, you should specify the language using -l.
16
17       If  -F  is  used or files are specified on the command line, the output
18       filename is PFX + "/" + filename + SFX.
19       Unless, of course, the options --replace or --no-backup are used.
20
21       When reading from stdin or doing a single file via the '-f' option, the
22       output is dumped to stdout, unless redirected with -o FILE.
23
24       Errors are always dumped to stderr
25
26

OPTIONS

28   Basic Options:
29       -c CFG Use the config file CFG.
30              If  not  specified,  uncrustify  will  use $UNCRUSTIFY_CONFIG or
31              $HOME/.uncrustify.cfg.
32
33       -f FILE
34              Process the single file FILE, sending output to  stdout  or  the
35              file specified with -o.
36
37       -o FILE
38              Redirect output to FILE.
39              Use  with  -f, --update-config, --update-config-with-doc, --uni‐
40              versalindent.
41
42       --check
43              Do not output the new text, instead verify that nothing  changes
44              when  the  file(s)  are  processed.  The status of every file is
45              printed to stderr. The exit code is EXIT_SUCCESS if  there  were
46              no changes, EXIT_FAILURE otherwise.
47
48       -F FILE
49              Read files to process from FILE, one filename per line.  If FILE
50              is ´-´ then read filenames from  standard  input  instead  of  a
51              file.
52              You  can  create  this  file  using something like ´find . -name
53              "*.c" > list.txt´.
54              This cannot be combined with -f.
55
56       --prefix PFX
57              Prepend PFX to the output filename path.
58              This cannot be combined with -f, --replace, or --no-backup.
59
60       --suffix SFX
61              Append SFX to the output filename.
62              The default is '.uncrustify' if neither SFX or  PFX  are  speci‐
63              fied.
64              This cannot be combined with -f, --replace, or --no-backup.
65
66       --frag Assume  the input is a code fragment and the first line is prop‐
67              erly indented.
68
69       --replace
70              Replace source files (creates a backup).
71              This cannot be combined with -f, --prefix, or --suffix.
72
73       --no-backup
74              Replace files, no backup. Useful if files are under source  con‐
75              trol
76              This cannot be combined with -f, --prefix, or --suffix.
77
78       --mtime
79              Preserve mtime on replaced files.
80
81       -l     Language override: C, CPP, D, CS, JAVA, PAWN, VALA, OC, OC+
82
83       -t     Load a file with types (usually not needed)
84
85       -q     Quiet mode - no output on stderr (-L will override)
86
87   Config/Help Options:
88       -h -? --help --usage
89              Print this message and exit
90
91       --version
92              Print the version and exit
93
94       --show-config
95              Print out option documentation and exit
96
97       --update-config
98              Output a new config file.
99
100       --update-config-with-doc
101              Output a new config file with embedded usage comments.
102
103       --universalindent
104              Output a config file for Universal Indent GUI.
105
106       --detect
107              Detects  the  config  from  a  source  file. Use with '-f FILE'.
108              Detection is currently fairly limited.
109
110
111   Debug Options:
112       -p FILE
113              Dump debug info to a file
114
115       -L SEV Set the log severity (see log_levels.h)
116
117       -s     Show the log severity in the logs
118
119       --decode FLAG
120              Print FLAG as text and exit
121
122

EXAMPLES

124       Read a D file from stdin, output to stdout.
125              cat foo.d | uncrustify -q -c my.cfg -l d
126
127       Process a file, output to stdout.
128              uncrustify -c my.cfg -d foo.d
129
130       Process a source tree, output to a different tree.
131              find src -name "*.[ch]" > files.txt
132              uncrustify -c my.cfg -F files.txt --prefix out
133
134       Process a source tree in‐place.
135              uncrustify -c my.cfg --no-backup $(find src -name "*.[ch]")
136
137

NOTES

139       Use comments containing ' *INDENT-OFF*' and ' *INDENT-ON*'  to  disable
140       processing of parts of the source file.
141
142

AUTHOR

144       Written by Ben Gardner
145
146

REPORTING BUGS

148       Use the issue tracker at <http://sourceforge.net/projects/uncrustify>
149
150
152       Copyright (C) 2006‐2014 Ben Gardner
153       Copyright (C) 2015, 2016 Guy Maurel
154
155

LICENSE

157       GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
158
159       This is free software; see the source for copying conditions.  There is
160       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
161       PURPOSE.
162
163
164
165
166uncrustify                         Oct 2014                      UNCRUSTIFY(1)
Impressum