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       -F FILE
43              Read files to process from FILE, one filename per line.
44              You can create this file using  something  like  ´find  .  -name
45              "*.c" > list.txt´.
46              This cannot be combined with -f.
47
48       --prefix PFX
49              Prepend PFX to the output filename path.
50              This cannot be combined with -f, --replace, or --no-backup.
51
52       --suffix SFX
53              Append SFX to the output filename.
54              The  default  is  '.uncrustify' if neither SFX or PFX are speci‐
55              fied.
56              This cannot be combined with -f, --replace, or --no-backup.
57
58       --frag Assume the input is a code fragment and the first line is  prop‐
59              erly indented.
60
61       --replace
62              Replace source files (creates a backup).
63              This cannot be combined with -f, --prefix, or --suffix.
64
65       --no-backup
66              Replace  files, no backup. Useful if files are under source con‐
67              trol
68              This cannot be combined with -f, --prefix, or --suffix.
69
70       --mtime
71              Preserve mtime on replaced files.
72
73       -l     Language override: C, CPP, D, CS, JAVA, PAWN, VALA, OC, OC+
74
75       -t     Load a file with types (usually not needed)
76
77       -q     Quiet mode - no output on stderr (-L will override)
78
79   Config/Help Options:
80       -h -? --help --usage
81              Print this message and exit
82
83       --version
84              Print the version and exit
85
86       --show-config
87              Print out option documentation and exit
88
89       --update-config
90              Output a new config file.
91
92       --update-config-with-doc
93              Output a new config file with embedded usage comments.
94
95       --universalindent
96              Output a config file for Universal Indent GUI.
97
98       --detect
99              Detects the config from a  source  file.  Use  with  '-f  FILE'.
100              Detection is currently fairly limited.
101
102
103   Debug Options:
104       -p FILE
105              Dump debug info to a file
106
107       -L SEV Set the log severity (see log_levels.h)
108
109       -s     Show the log severity in the logs
110
111       --decode FLAG
112              Print FLAG as text and exit
113
114

EXAMPLES

116       Read a D file from stdin, output to stdout.
117              cat foo.d | uncrustify -q -c my.cfg -l d
118
119       Process a file, output to stdout.
120              uncrustify -c my.cfg -d foo.d
121
122       Process a source tree, output to a different tree.
123              find src -name "*.[ch]" > files.txt
124              uncrustify -c my.cfg -F files.txt --prefix out
125
126       Process a source tree in‐place.
127              uncrustify -c my.cfg --no-backup $(find src -name "*.[ch]")
128
129

NOTES

131       Use  comments  containing ' *INDENT-OFF*' and ' *INDENT-ON*' to disable
132       processing of parts of the source file.
133
134

AUTHOR

136       Written by Ben Gardner
137
138

REPORTING BUGS

140       Use the issue tracker at <http://sourceforge.net/projects/uncrustify>
141
142
144       Copyright (C) 2006‐2009 Ben Gardner
145
146

LICENSE

148       GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
149
150       This is free software; see the source for copying conditions.  There is
151       NO  warranty;  not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
152       PURPOSE.
153
154
155
156
157uncrustify 0.58                    Oct 2009                      UNCRUSTIFY(1)
Impressum