-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.perltidyrc
183 lines (183 loc) · 9.13 KB
/
.perltidyrc
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
182
183
#Options have short and long forms. Short forms are shown; see
#man pages for long forms. Note: '=s' indicates a required string,
#and '=n' indicates a required integer.
#
#I/O control
# -h show this help
# -o=file name of the output file (only if single input file)
# -oext=s change output extension from 'tdy' to s
# -opath=path change path to be 'path' for output files
-b # backup original to .bak and modify file in-place
# -bext=s change default backup extension from 'bak' to s
# -q deactivate error messages (for running under editor)
# -w include non-critical warning messages in the .ERR error output
# -syn run perl -c to check syntax (default under unix systems)
# -log save .LOG file, which has useful diagnostics
# -f force perltidy to read a binary file
# -g like -log but writes more detailed .LOG file, for debugging scripts
# -opt write the set of options actually used to a .LOG file
# -npro ignore .perltidyrc configuration command file
# -pro=file read configuration commands from file instead of .perltidyrc
# -st send output to standard output, STDOUT
-se # send error output to standard error output, STDERR
# -v display version number to standard output and quit
#
#Basic Options:
-i=4 # use n columns per indentation level (default n=4)
# -t tabs: use one tab character per indentation level, not recommeded
# -nt no tabs: use n spaces per indentation level (default)
# -et=n entab leading whitespace n spaces per tab; not recommended
# -io "indent only": just do indentation, no other formatting.
# -sil=n set starting indentation level to n; use if auto detection fails
# -ole=s specify output line ending (s=dos or win, mac, unix)
# -ple keep output line endings same as input (input must be filename)
#
#Whitespace Control
# -fws freeze whitespace; this disables all whitespace changes
# and disables the following switches:
-bt=0 # sets brace tightness, n= (0 = loose, 1=default, 2 = tight)
-bbt=0 # same as -bt but for code block braces; same as -bt if not given
# -bbvt block braces vertically tight; use with -bl or -bli
# -bbvtl=s make -bbvt to apply to selected list of block types
-pt=0 # paren tightness (n=0, 1 or 2)
-sbt=1 # square bracket tightness (n=0, 1, or 2)
# -bvt=n brace vertical tightness,
# n=(0=open, 1=close unless multiple steps on a line, 2=always close)
# -pvt=n paren vertical tightness (see -bvt for n)
# -sbvt=n square bracket vertical tightness (see -bvt for n)
# -bvtc=n closing brace vertical tightness:
# n=(0=open, 1=sometimes close, 2=always close)
# -pvtc=n closing paren vertical tightness, see -bvtc for n.
# -sbvtc=n closing square bracket vertical tightness, see -bvtc for n.
-ci=4 # sets continuation indentation=n, default is n=2 spaces
# -lp line up parentheses, brackets, and non-BLOCK braces
# -sfs add space before semicolon in for( ; ; )
-nsfs
# -aws allow perltidy to add whitespace (default)
-dws # delete all old non-essential whitespace
# -icb indent closing brace of a code block
-cti=0 # closing indentation of paren, square bracket, or non-block brace:
# n=0 none, =1 align with opening, =2 one full indentation level
# -icp equivalent to -cti=2
# -wls=s want space left of tokens in string; i.e. -nwls='+ - * /'
# -wrs=s want space right of tokens in string;
# -sts put space before terminal semicolon of a statement
# -sak=s put space between keywords given in s and '(';
# -nsak=s no space between keywords in s and '('; i.e. -nsak='my our local'
#
#Line Break Control
# -fnl freeze newlines; this disables all line break changes
# and disables the following switches:
-anl # add newlines; ok to introduce new line breaks
-bbs # add blank line before subs and packages
# -bbc add blank line before block comments
# -bbb add blank line between major blocks
# -kbl=n keep old blank lines? 0=no, 1=some, 2=all
# -mbl=n maximum consecutive blank lines to output (default=1)
# -ce cuddled else; use this style: '} else {'
# -dnl delete old newlines (default)
-l=120 # maximum line length; default n=80
# -bl opening brace on new line
# -sbl opening sub brace on new line. value of -bl is used if not given.
# -bli opening brace on new line and indented
# -bar opening brace always on right, even for long clauses
#-bar
-vt=0 # vertical tightness (requires -lp); n controls break after opening
# token: 0=never 1=no break if next line balanced 2=no break
-vtc=0 # vertical tightness of closing container; n controls if closing
# token starts new line: 0=always 1=not unless list 1=never
# -wba=s want break after tokens in string; i.e. wba=': .'
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" # -wbb=s want break before tokens in string
#
#Following Old Breakpoints
# -kis keep interior semicolons. Allows multiple statements per line.
# -boc break at old comma breaks: turns off all automatic list formatting
#-boc
# -bol break at old logical breakpoints: or, and, ||, && (default)
# -bok break at old list keyword breakpoints such as map, sort (default)
# -bot break at old conditional (ternary ?:) operator breakpoints (default)
-cab=2 # break at commas after a comma-arrow (=>):
# n=0 break at all commas after =>
# n=1 stable: break unless this breaks an existing one-line container
# n=2 break only if a one-line container cannot be formed
# n=3 do not treat commas after => specially at all
#
#Comment controls
# -ibc indent block comments (default)
# -isbc indent spaced block comments; may indent unless no leading space
# -msc=n minimum desired spaces to side comment, default 4
# -fpsc=n fix position for side comments; default 0;
# -csc # add or update closing side comments after closing BLOCK brace
# -dcsc # delete closing side comments created by a -csc command
# -cscp=s change closing side comment prefix to be other than '## end'
# -cscl=s change closing side comment to apply to selected list of blocks
# -csci=n minimum number of lines needed to apply a -csc tag, default n=6
# -csct=n maximum number of columns of appended text, default n=20
# -cscw causes warning if old side comment is overwritten with -csc
#
# -sbc # use 'static block comments' identified by leading '##' (default)
# -sbcp=s change static block comment identifier to be other than '##'
# -osbc # outdent static block comments
#
# -ssc # use 'static side comments' identified by leading '##' (default)
# -sscp=s change static side comment identifier to be other than '##'
#
#Delete selected text
# -dac delete all comments AND pod
# -dbc delete block comments
# -dsc delete side comments
# -dp delete pod
#
#Send selected text to a '.TEE' file
# -tac tee all comments AND pod
# -tbc tee block comments
# -tsc tee side comments
# -tp tee pod
#
#Outdenting
# -olq outdent long quoted strings (default)
-nolq
# -olc outdent a long block comment line
# -ola outdent statement labels
# -okw outdent control keywords (redo, next, last, goto, return)
# -okwl=s specify alternative keywords for -okw command
#
#Other controls
# -mft=n maximum fields per table; default n=40
# -x do not format lines before hash-bang line (i.e., for VMS)
# -asc allows perltidy to add a ';' when missing (default)
# -dsm allows perltidy to delete an unnecessary ';' (default)
#
#Combinations of other parameters
# -gnu attempt to follow GNU Coding Standards as applied to perl
# -mangle remove as many newlines as possible (but keep comments and pods)
# -extrude insert as many newlines as possible
#
#Dump and die, debugging
# -dop dump options used in this run to standard output and quit
# -ddf dump default options to standard output and quit
# -dsn dump all option short names to standard output and quit
# -dln dump option long names to standard output and quit
# -dpro dump whatever configuration file is in effect to standard output
# -dtt dump all token types to standard output and quit
#
#HTML
# -html write an html file (see 'man perl2web' for many options)
# Note: when -html is used, no indentation or formatting are done.
# Hint: try perltidy -html -css=mystyle.css filename.pl
# and edit mystyle.css to change the appearance of filename.html.
# -nnn gives line numbers
# -pre only writes out <pre>..</pre> code section
# -toc places a table of contents to subs at the top (default)
# -pod passes pod text through pod2html (default)
# -frm write html as a frame (3 files)
# -text=s extra extension for table of contents if -frm, default='toc'
# -sext=s extra extension for file content if -frm, default='src'
#
#A prefix of "n" negates short form toggle switches, and a prefix of "no"
#negates the long forms. For example, -nasc means don't add missing
#semicolons.
#
#If you are unable to see this entire text, try "perltidy -h | more"
#For more detailed information, and additional options, try "man perltidy",
#or go to the perltidy home page at http://perltidy.sourceforge.net