forked from openmelody/melody
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.perltidyrc
66 lines (56 loc) · 2.51 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
##################### Official Melody perltidyrc file #####################
##### HOW TO USE: After installing perltidy, cd to your Melody root
##### directory. To run on a single file, creating a backup at FILE.bak:
#####
##### perltidy PATH/TO/FILE
#####
##### You can use shell glob characters to run on multiple files:
#####
##### perltidy PATH/TO/DIR/*.p[lm]
#####
##### You can also use the 'find' command to run recusively:
#####
##### find plugins/MyPlugin -name '*\.pm' -exec perltidy {} \;
#####
##### To ensure that you are always using this configuration file, you can
##### set the PERLTIDY environment variable or use the -pro command-line
##### option. Please see the perltidy man page for further details.
#####
##### For full details about the rules in this perltidyrc please see
##### http://bit.ly/perltidystyles
###########################################################################
-l=98 # Max line width is 98 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 in 3-part "for" loop
-nolq # Don't outdent long quoted strings
# Break before all operators
-wbb="% + - * / x != == >= <= =~ < > | & **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
# extras/overrides/deviations from PBP
--maximum-line-length=78 # be less generous
--warning-output # Show warnings
--maximum-consecutive-blank-lines=2 # default is 1
--nohanging-side-comments # troublesome for commented out code
# Block comments may only be indented if they have some leading space
# characters. This allows you to comment out a section of code in the first
# column without having those comments indented. (-isbc)
--indent-spaced-block-comments
# Continuation indent is 2 cols
-ci=2
# Compresses vertical space of opening tokens,
# much like a regular code block with opening brace on the right
-sot
# We use version control, so just rewrite the file
# this will create a '.bak' file which is ignored by git via .gitignore
--backup-and-modify-in-place
# Perl Best Practices (plus errata) .perltidyrc file
# Thanks to the Mojo team (http://github.com/kraih/mojo/) for an excellent
# start on this .perltidyrc