reformat with perltidy and add sample perltidyrc file
This commit is contained in:
parent
d20eb25772
commit
d9ab063603
|
@ -0,0 +1,42 @@
|
||||||
|
-l=120
|
||||||
|
# Max line width is 120 cols
|
||||||
|
|
||||||
|
-i=4
|
||||||
|
# Indent level is 4 cols
|
||||||
|
|
||||||
|
-ci=4
|
||||||
|
# Continuation indent is 4 cols
|
||||||
|
|
||||||
|
-st
|
||||||
|
# Output to STDOUT
|
||||||
|
|
||||||
|
-se
|
||||||
|
# Errors to STDERR
|
||||||
|
|
||||||
|
-vt=2
|
||||||
|
# Maximal vertical tightness
|
||||||
|
|
||||||
|
-cti=0
|
||||||
|
# No extra indentation for closing brackets
|
||||||
|
|
||||||
|
-pt=1
|
||||||
|
# Medium parenthesis tightness
|
||||||
|
|
||||||
|
-bt=1
|
||||||
|
# Medium brace tightness
|
||||||
|
|
||||||
|
-sbt=1
|
||||||
|
# Medium square bracket tightness
|
||||||
|
|
||||||
|
-bbt=1
|
||||||
|
# Medium block brace tightness
|
||||||
|
|
||||||
|
-nsfs
|
||||||
|
# No space before semicolons
|
||||||
|
|
||||||
|
-nolq
|
||||||
|
# Don't outdent long
|
||||||
|
# quoted strings
|
||||||
|
|
||||||
|
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= ><<= &&= -= /= |= >>= ||= .= %= ^= x="
|
||||||
|
# Break before all operators
|
|
@ -18,8 +18,7 @@ my $res = GetOptions(
|
||||||
"output" => \$output
|
"output" => \$output
|
||||||
);
|
);
|
||||||
if ( !$res || $help ) {
|
if ( !$res || $help ) {
|
||||||
print
|
print "$0 [--base=/usr/share/zoneinfo] [--output=timezones.conf.xml] [--debug] [--help]\n";
|
||||||
"$0 [--base=/usr/share/zoneinfo] [--output=timezones.conf.xml] [--debug] [--help]\n";
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +68,7 @@ foreach my $name ( sort( keys(%name_to_file) ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
open( my $out, ">$output" );
|
open( my $out, ">$output" );
|
||||||
print $out
|
print $out "<configuration name=\"timezones.conf\" description=\"Timezones\">\n";
|
||||||
"<configuration name=\"timezones.conf\" description=\"Timezones\">\n";
|
|
||||||
print $out " " x 4, "<timezones>\n";
|
print $out " " x 4, "<timezones>\n";
|
||||||
|
|
||||||
my $lastprefix = "";
|
my $lastprefix = "";
|
||||||
|
|
Loading…
Reference in New Issue