Skip to content

Coding style guidelines

Luc Didry edited this page Jan 28, 2022 · 3 revisions

The coding style is periodically enforced with perltidy. You will find here a description of the perltidy rules used in Sympa.

Based on the perltidy configuration file:

Perltidy’s option Meaning
-bar Opening brace always on right, not on a new linge
-bbt=1 Medium block brace tightness
-bt=2 Strong brace tightness
-pt=2 Strong parenthesis tightness
-sbt=2 Strong square bracket tightness
-vt=2 Maximal vertical tightness
-ce Cuddled else (the else is on the line of the if closing brace)
-cti=0 No extra indentation for closing brackets
-i=4 Indent level is 4 cols
-ci=4 Continuation indent is 4 cols
-l=78 Max line width is 78 cols
-nolc Don't outdent long comments
-nolq Don't outdent long quoted strings
-nsbl No opening sub brace on new line
-nsfs No space before semicolons
-sbcp='#' Don't format non-static block comments automatically
-wba="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" Wants breaks after those token types
Clone this wiki locally