Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: styleguide/styleguide.md

Issue 2152283002: Fix minor problem in styleguide page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
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 # Chromium coding style 1 # Chromium coding style
2 2
3 ## Main style guides 3 ## Main style guides
4 4
5 * [Chromium C++ style guide](c++/c++.md) 5 * [Chromium C++ style guide](c++/c++.md)
6 * [Google Objective-C style guide](https://google.github.io/styleguide/objcgui de.xml) 6 * [Google Objective-C style guide](https://google.github.io/styleguide/objcgui de.xml)
7 * [Java style guide for Android](https://sites.google.com/a/chromium.org/dev/d evelopers/coding-style/java) 7 * [Java style guide for Android](https://sites.google.com/a/chromium.org/dev/d evelopers/coding-style/java)
8 * [GN style guide](../tools/gn/docs/style_guide.md) for build files 8 * [GN style guide](../tools/gn/docs/style_guide.md) for build files
9 9
10 Chromium also uses these languages to a lesser degree: 10 Chromium also uses these languages to a lesser degree:
11 11
12 * [Kernel C style](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux .git/tree/Documentation/CodingStyle?id=refs/heads/master) for ChromiumOS firmwar e. 12 * [Kernel C style](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux .git/tree/Documentation/CodingStyle?id=refs/heads/master) for ChromiumOS firmwar e.
13 * [IDL](https://sites.google.com/a/chromium.org/dev/blink/webidl#TOC-Style) 13 * [IDL](https://sites.google.com/a/chromium.org/dev/blink/webidl#TOC-Style)
14 * [Jinja style guide](https://sites.google.com/a/chromium.org/dev/developers/j inja#TOC-Style) for [Jinja](https://sites.google.com/a/chromium.org/dev/develope rs/jinja) templates. 14 * [Jinja style guide](https://sites.google.com/a/chromium.org/dev/developers/j inja#TOC-Style) for [Jinja](https://sites.google.com/a/chromium.org/dev/develope rs/jinja) templates.
15 15
16 ## Python 16 ## Python
17 17
18 Python code should follow [PEP-8](https://www.python.org/dev/peps/pep-0008/), 18 Python code should follow [PEP-8](https://www.python.org/dev/peps/pep-0008/),
19 except: 19 except:
20 20
21 * Use two-space indentation instead of four-space indentation. 21 * Use two-space indentation instead of four-space indentation.
22 * Use `CamelCase()` method and function names instead of 22 * Use `CamelCase()` method and function names instead of `unix_hacker_style()` names.
23 * `unix_hacker_style()` names. 23
24
25 (The rationale for these is mostly legacy: the code was originally written 24 (The rationale for these is mostly legacy: the code was originally written
26 following Google's internal style guideline, the cost of updating all of the 25 following Google's internal style guideline, the cost of updating all of the
27 code to PEP-8 compliance was not small, and consistency was seen to be a 26 code to PEP-8 compliance was not small, and consistency was seen to be a
28 greater virtue than compliance.) 27 greater virtue than compliance.)
29 28
30 [Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/dep ot_tools/docs/html/depot_tools.html) 29 [Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/dep ot_tools/docs/html/depot_tools.html)
31 contains a local copy of pylint, appropriately configured. 30 contains a local copy of pylint, appropriately configured.
32 31
33 Note that asserts are of limited use, and should not be used for validating 32 Note that asserts are of limited use, and should not be used for validating
34 input – throw an exception instead. Asserts can be used for validating program 33 input – throw an exception instead. Asserts can be used for validating program
35 logic, especially use of interfaces or invariants (e.g., asserting that a 34 logic, especially use of interfaces or invariants (e.g., asserting that a
36 function is only called with dictionaries that contain a certain key). [See 35 function is only called with dictionaries that contain a certain key). [See
37 Using Assertions 36 Using Assertions
38 Effectively](https://wiki.python.org/moin/UsingAssertionsEffectively). 37 Effectively](https://wiki.python.org/moin/UsingAssertionsEffectively).
39 38
40 See also the [Chromium OS Python Style 39 See also the [Chromium OS Python Style
41 Guidelines](https://sites.google.com/a/chromium.org/dev/chromium-os/python-style -guidelines). 40 Guidelines](https://sites.google.com/a/chromium.org/dev/chromium-os/python-style -guidelines).
42 41
43 ## Web languages (JavaScript, HTML, CSS) 42 ## Web languages (JavaScript, HTML, CSS)
44 43
45 When working on Web-based UI features, consult the [Web Development Style Guide] (https://sites.google.com/a/chromium.org/dev/developers/web-development-style-gu ide) for the Chromium conventions used in JS/CSS/HTML files. 44 When working on Web-based UI features, consult the [Web Development Style Guide] (https://sites.google.com/a/chromium.org/dev/developers/web-development-style-gu ide) for the Chromium conventions used in JS/CSS/HTML files.
46 45
47 Internal uses of web languages, notably "layout" tests, should preferably follow these style guides, but it is not enforced. 46 Internal uses of web languages, notably "layout" tests, should preferably follow these style guides, but it is not enforced.
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 408576698