Subject: Developers of Sympa
List archive
- From: Guillaume Rousse <address@concealed>
- To: address@concealed
- Subject: [sympa-developpers] coding style
- Date: Thu, 03 Oct 2013 16:16:27 +0200
Le 02/10/2013 12:11, David Verdin a écrit :
I'm OK with general coding conventions given here, a bit less with perltidy result with the suggested settingsGreat!Code formattingI have no objection.
* Let's indent with spaces. 4 spaces width.
* We will not use perltidy in a post-commit hook. it could mess up
carefully hand-crafted code layout.
* We should however run perltydy once before continuing bug fixing, so
that, if some of the layout is messed up, it is at least at a time
when we have to read the code a lot and potentially fix some abusive
line feeds.
OK, Let's remove it.
* do everybody agrees with the following settings?Difference from PBP are:
-bar # Opening brace always on right (* no)
-bbt=1 # Medium block brace tightness
-bt=1 # Medium brace tightness (* 1)
-ce # Cuddled else (* no)
-cti=0 # No extra indentation for closing brackets
-et=4 # Entab leading 4 whitespace (* none)
-i=4 # Indent level is 4 cols
-ci=4 # Continuation indent is 8 cols
-l=78 # Max line witdh is 78 cols
-nolq # Don't outdent long quoted strings
-nsbl # No opening sub brace on new line (* -sbl)
-nsfs # No space before semicolons
-pt=1 # Medium parenthesis tightness (* 1)
-sbt=1 # Medium square bracket tightness (* 1)
-se # Errors to STDERR
#-st # Output to STDOUT
-vt=2 # Maximal vertical tightness
-wba="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||=
.= %= ^= x= || && . ? : and or xor"
# Break after all operators (* not contains "||" and tokens appear after it)
-ce : Cuddled else (PBP : -nce)
-et=4 : Entab leading 4 whitespace (PBP : none)
-nsbl : No opening sub brace on new line (PBP : -sbl)
-wba : Add following operators
|| && . ? : and or xor
In above, "-et=4" seems to be inconsistent with your proposal.
OK, let's remove it.
Addition to -wba (by me) sometimes generates a bit misterious
results.
my $self = {
base => $params{base}
};
turns into
my $self = { base => $params{base} };
Which is an unwanted change.
And I don't understand why
($robot)
stays
($robot)
while
($listname and length $listname)
turns into
( $listname and length $listname )
I prefer the first version personaly, but I'm rather concerned by the lack of consistency.
Please fix those issues before running perltidy.
Alternatively, as perltidy usage will ruin my efforts to carefully indent SQL queries, meaning I'll have to post-process the results anyway, I'm eventually volonteer to fix indentation manually as I've done sofar, in less intrusive manner.
--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31
Attachment:
smime.p7s
Description: Signature cryptographique S/MIME
-
Re: [sympa-developpers] Merge is over, what now?
, (continued)
-
Re: [sympa-developpers] Merge is over, what now?,
David Verdin, 10/02/2013
-
Re: [sympa-developpers] Merge is over, what now?,
IKEDA Soji, 10/03/2013
-
Re: [sympa-developpers] Merge is over, what now?,
Guillaume Rousse, 10/03/2013
-
[sympa-developpers] Using exception,
IKEDA Soji, 10/04/2013
-
Re: [sympa-developpers] Using exception,
Guillaume Rousse, 10/07/2013
- Re: [sympa-developpers] Using exception, Guillaume Rousse, 10/07/2013
- Re: [sympa-developpers] Using exception, IKEDA Soji, 10/21/2013
- Re: [sympa-developpers] Using exception, Guillaume Rousse, 10/21/2013
-
Re: [sympa-developpers] Using exception,
Guillaume Rousse, 10/07/2013
-
[sympa-developpers] Using exception,
IKEDA Soji, 10/04/2013
-
Message not available
- Re: [sympa-developpers] Using exception, IKEDA Soji, 10/14/2013
- Re: [sympa-developpers] Using exception, IKEDA Soji, 10/16/2013
-
Re: [sympa-developpers] Merge is over, what now?,
Guillaume Rousse, 10/03/2013
-
Re: [sympa-developpers] Merge is over, what now?,
IKEDA Soji, 10/03/2013
-
Re: [sympa-developpers] Merge is over, what now?,
David Verdin, 10/02/2013
- Re: [sympa-developpers] coding style, Guillaume Rousse, 10/07/2013
Archive powered by MHonArc 2.6.19+.