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, or defaults if CFG is set to '-'.
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       --count-options
95              Print the number of available options and exit
96
97       --show-config
98              Print out option documentation and exit
99
100       --update-config
101              Output a new config file.
102
103       --update-config-with-doc
104              Output a new config file with embedded usage comments.
105
106       --universalindent
107              Output a config file for Universal Indent GUI.
108
109       --detect
110              Detects  the config from a source file. Use with '-f FILE'.  De‐
111              tection is currently fairly limited.
112
113
114   Debug Options:
115       -p FILE
116              Dump debug info into FILE, or to stdout if FILE is set to '-'.
117              Must be used in combination with '-f FILE'.
118
119       -ds FILE --dump-steps FILE
120              Dump parsing info at various moments of the formatting process.
121              This creates a series of files named 'FILE_nnn.log', each
122              corresponding to a formatting step in uncrustify.
123              The file 'FILE_000.log' lists the formatting options in use.
124              Must be used in combination with '-f FILE'.
125
126       -L SEV Set the log severity (see log_levels.h)
127
128       -s     Show the log severity in the logs
129
130       --decode FLAG
131              Print FLAG as text and exit
132
133

EXAMPLES

135       Read a D file from stdin, output to stdout.
136              cat foo.d | uncrustify -q -c my.cfg -l d
137
138       Process a file, output to stdout.
139              uncrustify -c my.cfg -d foo.d
140
141       Process a source tree, output to a different tree.
142              find src -name "*.[ch]" > files.txt
143              uncrustify -c my.cfg -F files.txt --prefix out
144
145       Process a source tree in‐place.
146              uncrustify -c my.cfg --no-backup $(find src -name "*.[ch]")
147
148

NOTES

150       Use comments containing ' *INDENT-OFF*' and ' *INDENT-ON*'  to  disable
151       processing of parts of the source file.
152
153

AUTHOR

155       Written by Ben Gardner
156
157

REPORTING BUGS

159       Use the issue tracker at <http://sourceforge.net/projects/uncrustify>
160
161
163       Copyright (C) 2006‐2014 Ben Gardner
164       Copyright (C) 2015, 2016 Guy Maurel
165
166

LICENSE

168       GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
169
170       This is free software; see the source for copying conditions.  There is
171       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
172       PURPOSE.
173
174
175
176
177uncrustify                         Oct 2014                      UNCRUSTIFY(1)
Impressum