Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: pages/coding-style.html

Issue 29329899: Issue 3158 - Add CSS and HTML rules to coding style page (Closed)
Patch Set: Created Nov. 9, 2015, 5:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 title=Coding Style 1 title=Coding Style
2 2
3 3
4 <h2 id="precedence">{{s1 Precedence}}</h2> 4 <h2 id="precedence">{{s1 Precedence}}</h2>
5 5
6 <p>{{s2 The Adblock Plus coding style is based on others. Our rules (both genera l and language specific) always overrule referenced style guides. The language s pecific sections overrule the general section.}}</p> 6 <p>{{s2 The Adblock Plus coding style is based on others. Our rules (both genera l and language specific) always overrule referenced style guides. The language s pecific sections overrule the general section.}}</p>
7 7
8 <h2 id="consistency">{{s3 Consistency}}</h2> 8 <h2 id="consistency">{{s3 Consistency}}</h2>
9 9
10 <p>{{s4 Consistency is most important: Be consistent within functions, files, mo dules and projects. Making existing code conform with this style guide is fine, but it should happen in dedicated commits, preferably for a whole module or proj ect at once.}}</p> 10 <p>{{s4 Consistency is most important: Be consistent within functions, files, mo dules and projects. Making existing code conform with this style guide is fine, but it should happen in dedicated commits, preferably for a whole module or proj ect at once.}}</p>
(...skipping 12 matching lines...) Expand all
23 </ul> 23 </ul>
24 24
25 <h2 id="javascript">{{s14 JavaScript}}</h2> 25 <h2 id="javascript">{{s14 JavaScript}}</h2>
26 <ul> 26 <ul>
27 <li>{{s15 Follow the Mozilla Coding Style's <a href="https://developer.mozilla.o rg/en-US/docs/Developer_Guide/Coding_Style#JavaScript_practices">JavaScript prac tices</a>.}}</li> 27 <li>{{s15 Follow the Mozilla Coding Style's <a href="https://developer.mozilla.o rg/en-US/docs/Developer_Guide/Coding_Style#JavaScript_practices">JavaScript prac tices</a>.}}</li>
28 <li>{{s16 Opening braces of object literals in don't go on their own line when t hat would cause a syntax error.}}</li> 28 <li>{{s16 Opening braces of object literals in don't go on their own line when t hat would cause a syntax error.}}</li>
29 <li>{{s17 Use <code>bind()</code> to ensure the desired value of the <code>this< /code> variable, don’t use temporary variables as a replacement.}}</li> 29 <li>{{s17 Use <code>bind()</code> to ensure the desired value of the <code>this< /code> variable, don’t use temporary variables as a replacement.}}</li>
30 <li>{{s18 In classes, prefix private functions with a single underscore to make them pseudo-private.}}</li> 30 <li>{{s18 In classes, prefix private functions with a single underscore to make them pseudo-private.}}</li>
31 </ul> 31 </ul>
32 32
33 <h2 id="html-css">{{html-css HTML and CSS}}</h2>
34 <ul>
35 <li>{{html-css1 Follow the <a href="https://google.github.io/styleguide/htmlcssg uide.xml">Google HTML/CSS Style Guide</a>.}}</li>
Thomas Greiner 2015/11/10 09:51:00 Please use descriptive identifiers instead of numb
Thomas Greiner 2015/11/10 09:51:00 Don't forget about indentation. The Objective-C li
saroyanm 2015/11/10 10:20:07 Done.
saroyanm 2015/11/10 10:20:07 Done, also added indentation to other elements.
36 <li>{{html-css2 Use double over single quotation marks.}}</li>
37 <li>{{html-css3 Don't omit optional HTML tags.}}</li>
38 <li>{{html-css4 CSS color values should be specified in hexadecimal where possib le.}}</li>
39 <li>{{html-css5 CSS shorthand properties usage is optional.}}</li>
40 <li>{{html-css6 CSS rule declaration order should follow the <a href="https://ma ke.wordpress.org/core/handbook/best-practices/coding-standards/css/#property-ord ering">WordPress CSS Coding Standards</a>.}}</li>
41 <li>{{html-css7 CSS number values should specify units where possible.}}</li>
42 <li>{{html-css8 CSS number values between -1 and 1 should specify a leading 0.}} </li>
43 </ul>
44
33 <h2 id="python">{{s19 Python}}</h2> 45 <h2 id="python">{{s19 Python}}</h2>
34 <ul> 46 <ul>
35 <li>{{s20 Follow the Mozilla Coding Style's <a href="https://developer.mozilla.o rg/en-US/docs/Developer_Guide/Coding_Style#Python_Practices">Python practices</a >.}}</li> 47 <li>{{s20 Follow the Mozilla Coding Style's <a href="https://developer.mozilla.o rg/en-US/docs/Developer_Guide/Coding_Style#Python_Practices">Python practices</a >.}}</li>
36 <li>{{s21 In modules, prefix private functions and variables with a single under score.}}</li> 48 <li>{{s21 In modules, prefix private functions and variables with a single under score.}}</li>
37 </ul> 49 </ul>
38 50
39 <h2 id="java">{{s22 Java}}</h2> 51 <h2 id="java">{{s22 Java}}</h2>
40 <ul> 52 <ul>
41 <li>{{s23 Follow the Mozilla Coding Style's <a href="https://developer.mozilla.o rg/en-US/docs/Developer_Guide/Coding_Style#Java_practices">Java practices</a>.}} </li> 53 <li>{{s23 Follow the Mozilla Coding Style's <a href="https://developer.mozilla.o rg/en-US/docs/Developer_Guide/Coding_Style#Java_practices">Java practices</a>.}} </li>
42 <li>{{s24 Imports should be organised consistently per file, we don't use global rules.}}</li> 54 <li>{{s24 Imports should be organised consistently per file, we don't use global rules.}}</li>
(...skipping 12 matching lines...) Expand all
55 <ul> 67 <ul>
56 <li>{{objc-conventions Follow Apple's <a href="https://developer.apple.com/lib rary/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Co nventions.html">conventions</a>}}.</li> 68 <li>{{objc-conventions Follow Apple's <a href="https://developer.apple.com/lib rary/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Co nventions.html">conventions</a>}}.</li>
57 </ul> 69 </ul>
58 70
59 <h2 id="puppet">{{s31 Puppet}}</h2> 71 <h2 id="puppet">{{s31 Puppet}}</h2>
60 <ul> 72 <ul>
61 <li>{{s32 Follow the <a href="http://docs.puppetlabs.com/guides/style_guide.html ">Puppet Style Guide</a>.}}</li> 73 <li>{{s32 Follow the <a href="http://docs.puppetlabs.com/guides/style_guide.html ">Puppet Style Guide</a>.}}</li>
62 <li>{{s33 Opening braces don't go on their own line.}}</li> 74 <li>{{s33 Opening braces don't go on their own line.}}</li>
63 <li>{{s34 Arrows should not be aligned.}}</li> 75 <li>{{s34 Arrows should not be aligned.}}</li>
64 </ul> 76 </ul>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld