summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/man/uncrustify.1.in
blob: 412672968f65712964d4bb1a537a9c1f73c1b964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
.TH UNCRUSTIFY "1" "Oct 2014" "uncrustify @PACKAGE_VERSION@" "User Commands"
.SH NAME
uncrustify \- C, C++, C#, D, Java and Pawn source code beautifier

.SH SYNOPSIS
.B uncrustify \fR[\fIOPTIONS\fR] [\fIFILES\fR]

.SH DESCRIPTION

If no input files are specified, the input is read from stdin.
.br
If reading from stdin, you should specify the language using \-l.

If \-F is used or files are specified on the command line, the output filename is
\fIPFX\fR + "/" + filename + \fISFX\fR.
.br
Unless, of course, the options \fB\-\-replace\fR or \fB\-\-no\-backup\fR are used.

When reading from stdin or doing a single file via the '\-f' option,
the output is dumped to stdout, unless redirected with \-o FILE.

Errors are always dumped to stderr

.SH OPTIONS
.SS "Basic Options:"
.TP
\fB\-c\fI CFG\fR
Use the config file \fICFG\fR, or defaults if \fICFG\fR is set to '-'.
.br
If not specified, uncrustify will use \fB$UNCRUSTIFY_CONFIG\fR or \fB$HOME/.uncrustify.cfg\fR.
.TP
\fB\-f\fI FILE\fR
Process the single file \fIFILE\fR, sending output to stdout or the file specified with \fB\-o\fR.
.TP
\fB\-o\fI FILE\fR
Redirect output to \fIFILE\fR.
.br
Use with \fB\-f\fR, \fB\-\-update\-config\fR, \fB\-\-update\-config\-with\-doc\fR,
\fB\-\-universalindent\fR.
.TP
\fB\-\-check\fR
Do not output the new text, instead verify that nothing changes when
the file(s) are processed. The status of every file is printed to
stderr. The exit code is EXIT_SUCCESS if there were no changes, EXIT_FAILURE otherwise.
.TP
\fB\-F\fI FILE\fR
Read files to process from \fIFILE\fR, one filename per line.  If \fIFILE\fR
is \'\-\' then read filenames from standard input instead of a file.
.br
You can create this file using something like \'\fBfind . \-name "*.c" > list.txt\fR\'.
.br
This cannot be combined with \fB\-f\fR.
.TP
\fB\-\-prefix\fI PFX\fR
Prepend \fIPFX\fR to the output filename path.
.br
This cannot be combined with \fB\-f\fR, \fB\-\-replace\fR, or \fB\-\-no\-backup\fR.
.TP
\fB\-\-suffix\fI SFX\fR
Append \fISFX\fR to the output filename.
.br
The default is '.uncrustify' if neither \fISFX\fR or \fIPFX\fR are specified.
.br
This cannot be combined with \fB\-f\fR, \fB\-\-replace\fR, or \fB\-\-no\-backup\fR.
.TP
\fB\-\-frag\fR
Assume the input is a code fragment and the first line is properly indented.
.TP
\fB\-\-replace\fR
Replace source files (creates a backup).
.br
This cannot be combined with \fB\-f\fR, \fB\-\-prefix\fR, or \fB\-\-suffix\fR.
.TP
\fB\-\-no\-backup\fR
Replace files, no backup. Useful if files are under source control
.br
This cannot be combined with \fB\-f\fR, \fB\-\-prefix\fR, or \fB\-\-suffix\fR.
.TP
\fB\-\-mtime\fR
Preserve mtime on replaced files.
.TP
\fB\-l\fR
Language override: C, CPP, D, CS, JAVA, PAWN, VALA, OC, OC+
.TP
\fB\-t\fR
Load a file with types (usually not needed)
.TP
\fB\-q\fR
Quiet mode \- no output on stderr (\fB\-L\fR will override)
.SS "Config/Help Options:"
.TP
\fB\-h\fR \-? \fB\-\-help\fR \fB\-\-usage\fR
Print this message and exit
.TP
\fB\-\-version\fR
Print the version and exit
.TP
\fB\-\-count\-options\fR
Print the number of available options and exit
.TP
\fB\-\-show\-config\fR
Print out option documentation and exit
.TP
\fB\-\-update\-config\fR
Output a new config file.
.TP
\fB\-\-update\-config\-with\-doc\fR
Output a new config file with embedded usage comments.
.TP
\fB\-\-universalindent\fR
Output a config file for Universal Indent GUI.
.TP
\fB\-\-detect\fR
Detects the config from a source file. Use with '\-f \fIFILE\fR'.
Detection is currently fairly limited.

.SS "Debug Options:"
.TP
\fB\-p \fIFILE\fR
Dump debug info into \fIFILE\fR, or to stdout if \fIFILE\fR is set to '-'.
.br
Must be used in combination with '-f \fIFILE\fR'.
.TP
\fB\-ds \fIFILE\fR \fB\-\-dump\-steps \fIFILE\fR
Dump parsing info at various moments of the formatting process.
.br
This creates a series of files named '\fIFILE\fR_nnn.log', each
.br
corresponding to a formatting step in uncrustify.
.br
The file '\fIFILE\fR_000.log' lists the formatting options in use.
.br
Must be used in combination with '-f \fIFILE\fR'.
.TP
\fB\-L\fI SEV\fR
Set the log severity (see log_levels.h)
.TP
\fB\-s\fR
Show the log severity in the logs
.TP
\fB\-\-decode\fI FLAG\fR
Print \fIFLAG\fR as text and exit

.SH EXAMPLES
.TP
Read a D file from stdin, output to stdout.
cat foo.d | uncrustify \-q \-c my.cfg \-l d
.TP
Process a file, output to stdout.
uncrustify \-c my.cfg \-d foo.d
.TP
Process a source tree, output to a different tree.
find src \-name "*.[ch]" > files.txt
.br
uncrustify \-c my.cfg \-F files.txt \-\-prefix out
.TP
Process a source tree in\(hyplace.
uncrustify \-c my.cfg \-\-no\-backup $(find src \-name "*.[ch]")

.SH NOTES
Use comments containing ' *INDENT\-OFF*' and ' *INDENT\-ON*' to disable
processing of parts of the source file.

.SH AUTHOR
Written by Ben Gardner

.SH REPORTING BUGS
Use the issue tracker at <http://sourceforge.net/projects/uncrustify>

.SH COPYRIGHT
Copyright (C) 2006\(hy2014 Ben Gardner
.br
Copyright (C) 2015, 2016 Guy Maurel

.SH LICENSE
GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>

This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.