Skip to content

Commit f3b8ad3

Browse files
authored
Apply Perltidy to translation-tool.pl (jenkinsci#6326)
1 parent ad72f4d commit f3b8ad3

File tree

2 files changed

+209
-74
lines changed

2 files changed

+209
-74
lines changed

.perltidyrc

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
#################################################
2+
# Categories outlined in this config
3+
# are based on the categories in the
4+
# perltidy man page:
5+
# http://perltidy.sourceforge.net/perltidy.html
6+
#################################################
7+
8+
###################################
9+
# I/O Control
10+
###################################
11+
12+
# Send all errors to standard output rather than a file.
13+
--standard-error-output
14+
15+
# All non-critical warnings will be reported as errors.
16+
--warning-output
17+
18+
###################################
19+
# Basic Options
20+
###################################
21+
22+
# Maximum number of characters per line.
23+
--maximum-line-length=80
24+
25+
###################################
26+
# Code Indentation Control
27+
###################################
28+
29+
# The number of spaces to indent a line when a new block starts.
30+
--indent-columns=4
31+
32+
# If a line continues, it should be indented 2 spaces.
33+
--continuation-indentation=4
34+
35+
# If a comment is longer than the maximum line length, break it up for
36+
# readability.
37+
--outdent-long-comments
38+
39+
# If a quoted string is longer than the maximum line length, do not break it up
40+
# for readability.
41+
--no-outdent-long-quotes
42+
43+
###################################
44+
# Whitespace Control
45+
###################################
46+
47+
# Stack opening braces in order to avoid having a brace sitting by itself on
48+
# a line.
49+
--stack-opening-tokens
50+
51+
# Stack closing tokens in order to avoid having a brace sitting by itself on
52+
# a line.
53+
--stack-closing-tokens
54+
55+
# Spaces between parentheses e.g. if ((my $len_tab = length($tabstr)) > 0) {
56+
--paren-tightness=2
57+
58+
# Spaces between brackets e.g. $width = $col[$j + $k] - $col[$j];
59+
--square-bracket-tightness=2
60+
61+
# Spaces between braces in expression e.g. $obj->{$parsed_sql->{'table'}[0]};
62+
--brace-tightness=2
63+
64+
# Spaces between braches with blocks of code
65+
# e.g. %bf = map { $_ => -M $_ } grep { /\.deb$/ } dirents '.';
66+
--block-brace-tightness=0
67+
68+
# Do not add spaces between semicolons within for loops.
69+
--nospace-for-semicolon
70+
71+
###################################
72+
# Comment Controls
73+
###################################
74+
75+
# Indent comments to be at the same level as the code.
76+
--indent-block-comments
77+
78+
###################################
79+
# Line Break Control
80+
###################################
81+
82+
# The else is on the same line as the brace.
83+
--cuddled-else
84+
85+
# Create a break after -> and period if a break is required.
86+
--want-break-after='-> .'
87+
88+
###################################
89+
# Blank Line Control
90+
###################################
91+
92+
# Do not force blank lines before full line comments.
93+
--noblanks-before-comments
94+
95+
# Do not force blank lines before blocks starting with for, foreach, while,
96+
# until, and if,unless.
97+
--noblanks-before-blocks
98+
99+
###################################
100+
# Vertical Alignment
101+
###################################
102+
103+
# Turn off vertical alignment.
104+
-novalign

0 commit comments

Comments
 (0)