styleguide
Style guides for Google-originated open-source projects
Google Style Guides: the conventions behind the code
A reference project that links the style guidelines used for Google code, from camelCase variable names to never using global variables, across many languages.
The rationale
The README explains the premise before listing anything. Every major open source project has its own style guide, a set of conventions, sometimes arbitrary, about how to write code for that project. A large codebase is easier to understand when all the code in it follows a consistent style. The project links to the style guidelines used for Google code, and projects that originated at Google may point contributors to this page. The homepage is google.github.io/styleguide, and the primary language listed is HTML.
How far style goes
The README is honest that style covers a lot of ground, from using camelCase for variable names to never using global variables to never using exceptions. The guides span many languages: AngularJS, Common Lisp, C++, C, Go, HTML and CSS, JavaScript, Java, JSON, Markdown, Objective-C, Python, R, Shell, Swift, TypeScript, and Vim script. An Emacs settings file for Google style is included in the project.
Tools and the XML guide
The project used to host the cpplint tool, but stopped making internal updates public. Users are directed to the community fork instead. An XML document format style guide offers advice on designing XML formats, formatting instances, and choosing between elements and attributes. There is also guidance on writing good commit messages, pointing to How to Write a Git Commit Message.
How contributions work
With few exceptions, the style guides are copies of Google's internal guides, maintained for developers working on Google owned and originated open source projects. Changes happen in the internal guides first and eventually appear here. Issues can be filed through the GitHub tracker, but the README is candid: the project is primarily optimizing for Google's internal needs. The guides themselves are licensed under CC-By 3.0, which encourages sharing them.
Community notes