Style guides for Google-originated open-source projects
HTML Python XSLT CSS JavaScript Emacs Lisp Other
Latest commit 9663cab Nov 15, 2017 @tonyruscoe tonyruscoe Merge pull request #298 from tonyruscoe/gh-pages
Update HTML/CSS style guide
Permalink
Failed to load latest commit information.
cpplint cpplint: Fix unittests when the styleguide directory is named otherwise Nov 11, 2017
docguide Replaced HTTP where HTTPS been awailable. Apr 1, 2016
include Update and replace JavaScript style guide. Nov 18, 2016
README.md Update link to Objective-C style guide Aug 22, 2017
Rguide.xml Reverted XML namespace name changes Apr 28, 2016
angularjs-google-style.html Update and replace JavaScript style guide. Nov 18, 2016
cppguide.html Fix a typo Dec 31, 2016
cppguide.xml Update C++ style guide to 4.45. Sep 8, 2014
eclipse-cpp-google-style.xml Add Google C++ Eclipse style config. Jun 29, 2012
eclipse-java-google-style.xml Update eclipse-java-google-style (#271) Sep 5, 2017
google-c-style.el Add autoload magic comments for the functions exposed by google-c-style. Sep 29, 2014
google-r-style.html Restore redirect to Rguide.xml from r105. Jul 18, 2013
google_python_style.vim New file google_python_style.vim. Nov 29, 2010
htmlcssguide.html Update HTML/CSS style guide Nov 15, 2017
htmlcssguide.xml Move, update, and convert HTML/CSS Style Guide from XML to HTML. (#232) Feb 24, 2017
intellij-java-google-style.xml Update intellij-java-google-style.xml Sep 7, 2017
javaguide.css Updated Java Style Guide to reflect current internal version. Jun 29, 2016
javaguide.html Update Java style guide Sep 30, 2017
javaguidelink.png initial commit for java style guide Dec 17, 2013
javascriptguide.xml Restore ES5 styleguide Dec 22, 2016
jsguide.html Fixed a typo. Jun 30, 2017
jsoncstyleguide.html Update look and feel of the style guides Jul 12, 2010
jsoncstyleguide.xml Replaced HTTP where HTTPS been awailable. Apr 1, 2016
jsoncstyleguide_example_01.png Adding first iteration of the JSON-C Style Guide for JSON APIs Feb 22, 2010
jsoncstyleguide_example_02.png Adding first iteration of the JSON-C Style Guide for JSON APIs Feb 22, 2010
lispguide.xml Fix a typo Sep 5, 2017
objcguide.md [objc] Update the Objective-C style guide 📜 Oct 17, 2017
objcguide.xml [objc] Fix the link to the new Objective-C style guide Aug 25, 2017
pyguide.html Revert HTTPS changes Jul 8, 2016
shell.xml Fix broken link May 26, 2017
styleguide.css Update look and feel of the style guides Jul 12, 2010
styleguide.xsl Reverted XML namespace name changes Apr 28, 2016
vimscriptfull.xml Removed link shortening. Apr 1, 2016
vimscriptguide.xml Removed link shortening. Apr 1, 2016
xmlstyle.html Replaced HTTP where HTTPS been awailable. Apr 1, 2016

README.md

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 (google/styleguide) links to 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.

This project holds the 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. This project also contains 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, the 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.

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

The following Google style guides live outside of this project: Go Code Review Comments and Effective Dart.

Creative Commons License