Labs/Jetpack/Reboot/Style Guide: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
Code style bikeshedding is great, let's do it, here we go.
Coding style bikeshedding is great, let's do it, here we go.


== Proposals ==
== Proposals ==
Line 96: Line 96:
   .doSomethingOnce();
   .doSomethingOnce();
</pre>
</pre>
80-character limit for all lines.


=== Comments and Documentation ===
=== Comments and Documentation ===
Line 145: Line 147:
Non-exported functions don't need to be documented this way, but it's encouraged.
Non-exported functions don't need to be documented this way, but it's encouraged.


All other comments are C++-style. If a comment is a full sentence, capitalize and punctuate it.  If a comment is almost a full sentence, make it a full sentence.  Full sentences are generally preferable to fragments, but fragments are sometimes more effective.  Fragments should be very terse.  Don't capitalize or punctuate fragments.
All other comments are C++-style.
 
If a comment is a full sentence, capitalize and punctuate it.  If a comment is almost a full sentence, make it a full sentence.  Full sentences are generally preferable to fragments, but fragments are sometimes more effective.  Fragments should be very terse.  Don't capitalize or punctuate fragments.


It's not necessary to use any special markup when referring to identifiers.  If an identifier is an English word or may otherwise be confused, the syntax <tt>|foo|</tt> is encouraged.
It's not necessary to use any special markup when referring to identifiers.  If an identifier is an English word or may otherwise be confused, the syntax <tt>|foo|</tt> is encouraged.
Confirmed users
764

edits