Style guides for Google-originated open-source projects
Go to file
2016-01-06 16:49:00 -05:00
cpplint update link to point to github instead of googlecode 2015-10-13 15:58:53 -07:00
docguide Fix unclear line limit 2015-09-03 19:04:20 -07:00
include Update C++ style guide to 4.45. 2014-09-08 17:01:51 +00:00
angularjs-google-style.html fixing a broken character 2014-05-21 20:28:07 +00:00
cppguide.html Update to current. 2016-01-06 16:09:22 -05:00
cppguide.xml Update C++ style guide to 4.45. 2014-09-08 17:01:51 +00:00
eclipse-cpp-google-style.xml Add Google C++ Eclipse style config. 2012-06-29 19:26:15 +00:00
eclipse-java-google-style.xml java style guide and eclipse configuration update 2014-02-03 23:39:45 +00:00
google_python_style.vim New file google_python_style.vim. 2010-11-29 20:32:06 +00:00
google-c-style.el Add autoload magic comments for the functions exposed by google-c-style. 2014-09-29 18:18:46 +00:00
google-r-style.html Restore redirect to Rguide.xml from r105. 2013-07-18 23:57:39 +00:00
htmlcssguide.xml Update C++ style guide to 3.260: 2013-07-12 18:53:13 +00:00
intellij-java-google-style.xml Adding config files for formatting for IntelliJ and Eclipse 2011-08-30 11:23:49 +00:00
javaguide.css java style guide update: presentation 2014-03-21 18:23:56 +00:00
javaguide.html java style guide update: presentation 2014-03-21 18:23:56 +00:00
javaguidelink.png initial commit for java style guide 2013-12-17 22:56:22 +00:00
javascriptguide.xml Update C++ style guide to 3.274: 2013-09-25 21:16:00 +00:00
jsoncstyleguide_example_01.png Adding first iteration of the JSON-C Style Guide for JSON APIs 2010-02-22 22:39:56 +00:00
jsoncstyleguide_example_02.png Adding first iteration of the JSON-C Style Guide for JSON APIs 2010-02-22 22:39:56 +00:00
jsoncstyleguide.html Update look and feel of the style guides 2010-07-12 21:58:39 +00:00
jsoncstyleguide.xml Adding licensing footer 2010-03-08 18:32:48 +00:00
lispguide.xml Update the Common Lisp Style Guide to 1.28. 2014-03-18 00:14:41 +00:00
objcguide.xml Update C++ style guide to 3.274: 2013-09-25 21:16:00 +00:00
pyguide.html Update C++ style guide to 3.274: 2013-09-25 21:16:00 +00:00
README.md Update README.md with R Style Guide 2015-08-08 14:26:37 -07:00
Rguide.xml Restore r105 of Rguide.xml, now with the svn:mime-type property set. 2013-07-18 23:41:50 +00:00
shell.xml Update C++ style guide to 3.274: 2013-09-25 21:16:00 +00:00
styleguide.css Update look and feel of the style guides 2010-07-12 21:58:39 +00:00
styleguide.xsl Update C++ style guide to 3.231: 2012-11-28 20:26:27 +00:00
vimscriptfull.xml Fix typo in vimscriptfull guide: addmatch->matchadd 2014-11-15 02:14:20 +00:00
vimscriptguide.xml Add vimscript style guide and "heavy" style guide. 2014-04-12 06:08:42 +00:00
xmlstyle.html Checked in scrubbed version of Google XML Document Format Style Guide 2009-03-18 17:23:38 +00:00

Google Style Guides

Every major open-source project has its own style guide: a set of conventions (sometimes arbitrary) about how to write code for that project. It is much easier to understand a large codebase when all the code in it is in a consistent style.

“Style” covers a lot of ground, from “use camelCase for variable names” to “never use global variables” to “never use exceptions.” This project holds the style guidelines we use for Google code. If you are modifying a project that originated at Google, you may be pointed to this page to see the style guides that apply to that project.

Our C++ Style Guide, Objective-C Style Guide, Java Style Guide, Python Style Guide, R Style Guide, Shell Style Guide, HTML/CSS Style Guide, JavaScript Style Guide, AngularJS Style Guide, Common Lisp Style Guide, and Vimscript Style Guide are now available. We have also released cpplint, a tool to assist with style guide compliance, and google-c-style.el, an Emacs settings file for Google style.

If your project requires that you create a new XML document format, our XML Document Format Style Guide may be helpful. In addition to actual style rules, it also contains advice on designing your own vs. adapting an existing format, on XML instance document formatting, and on elements vs. attributes.

These style guides are licensed under the CC-By 3.0 License, which encourages you to share these documents. See http://creativecommons.org/licenses/by/3.0/ for more details.