blob: 8dceae2b4c60a1b3d8ce6584a50b95fbbcc6a0ab [file] [log] [blame] [view]
brettwf0e606a52016-07-06 21:17:201# Chromium coding style
2
3## Main style guides
4
Jaeheon Yi1990e582021-10-01 22:07:395* [Chromium C++ style guide](c++/c++.md)
Avi Drissman0aafa9e2022-01-18 21:41:016 * [Modern C++ use](c++/c++-features.md) for allowed/banned features.
Jaeheon Yi1990e582021-10-01 22:07:397 * See also: [C++ Dos and Don'ts](c++/c++-dos-and-donts.md) for Chromium
8 best-practices.
Caleb Raitto34a62102025-03-21 20:32:209 * [Blink C++ style](c++/blink-c++.md)
Jaeheon Yi1990e582021-10-01 22:07:3910* [Chromium Objective-C style guide](objective-c/objective-c.md)
Lukasz Anforowiczf784d432025-07-28 15:53:2511* [Chromium Rust style guide](rust/rust.md)
Jaeheon Yi1990e582021-10-01 22:07:3912* [Chromium Swift style guide](swift/swift.md)
13* [Java style guide for Android](java/java.md)
14* [Chromium Python style guide](python/python.md)
Caleb Raitto34a62102025-03-21 20:32:2015 * [Blink Python style](python/blink-python.md)
Jaeheon Yi1990e582021-10-01 22:07:3916* [GN style guide](https://gn.googlesource.com/gn/+/main/docs/style_guide.md)
17 for build files.
18 * See also: [Writing GN templates](../build/docs/writing_gn_templates.md)
19 for Chromium best-practices.
Ming-Ying Chung99ebfd72023-03-03 01:01:4820* [Markdown style guide](markdown/markdown.md)
brettwf0e606a52016-07-06 21:17:2021
22Chromium also uses these languages to a lesser degree:
23
Jaeheon Yi1990e582021-10-01 22:07:3924* [Kernel C style](https://www.kernel.org/doc/html/latest/process/coding-style.html)
25 for ChromiumOS firmware.
Caleb Raitto34a62102025-03-21 20:32:2026* [WebIDL](https://www.chromium.org/blink/webidl/#syntax)
27* [Mojo IDL](../docs/security/mojo.md) for cross-process IPC
Jaeheon Yi1990e582021-10-01 22:07:3928* [Jinja style guide](https://sites.google.com/a/chromium.org/dev/developers/jinja#TOC-Style)
29 for [Jinja](https://sites.google.com/a/chromium.org/dev/developers/jinja)
30 templates.
Caleb Raitto373242562025-03-21 19:40:0131* [SQLite SQL style](../sql/README.md#SQL-style) for storage of cookies, etc.
brettwf0e606a52016-07-06 21:17:2032
Jaeheon Yi1990e582021-10-01 22:07:3933Regardless of the language used, please keep code
34[inclusive for all contributors](inclusive_code.md).
benwells3ab41652017-03-31 22:20:4235
brettwf0e606a52016-07-06 21:17:2036## Web languages (JavaScript, HTML, CSS)
37
Jaeheon Yi1990e582021-10-01 22:07:3938When working on Web-based UI features, consult the
39[Web Development Style Guide](web/web.md) for the Chromium conventions used in
40JS/CSS/HTML files.
brettwf0e606a52016-07-06 21:17:2041
Jaeheon Yi1990e582021-10-01 22:07:3942Internal uses of web languages, notably "layout" tests, should preferably follow
43these style guides, but it is not enforced.