styleguide

Style guides for Google-originated open-source projects

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star half bd79095782ee4930099175e5ce7f4c89fa3ddabcd56fffcc7c74f6f2a2d46b27 (1 ratings)
Rated 4.5 out of 5
Subscribe to updates I use styleguide


Statistics on styleguide

Number of watchers on Github 8082
Number of open issues 135
Average time to close an issue 29 days
Main language HTML
Average time to merge a PR 8 days
Open pull requests 71+
Closed pull requests 18+
Last commit 3 months ago
Repo Created almost 2 years ago
Repo Last Updated about 1 month ago
Size 1.59 MB
Organization / Authorgoogle
Contributors9
Page Updated
Do you use styleguide? Leave a review!
View open issues (135)
View styleguide activity
View TODOs for styleguide (19)
View on github
Latest Open Source Launches
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating styleguide for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)
What people are saying about styleguide Leave a review
My play store can't open it

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 https://creativecommons.org/licenses/by/3.0/ for more details.

Creative Commons License

styleguide open issues Ask a question     (View All Issues)
  • 5 months Suggest adding "private static Function..." to java constants examples
  • 6 months C++ Style Guide: 64-bit Portability conflicts with Integer Types section
  • 6 months runtime/explicit doesn't appear with particular class ctor
  • 6 months google-c-style.el not properly indenting with class member initializer
  • 7 months cpplint: virtual and final are flagged as an error
  • 7 months False positive: Add #include <algorithm> for sort
  • 7 months Incorrect import for Intellij 2016.2
  • 7 months Add index.html to make http://google.github.io/styleguide/ browsable
  • 8 months cpplint: readability/function error not thrown with multiple arguments.
  • 8 months cpplint does not understand C++11 attributes
  • 8 months Error with installing eclipse-java-google-style.xml
  • 9 months htmlcssguide error : no comments above doctpye
  • 9 months Link in Objective-C Guide returns 404
  • 9 months shell styleguide conflicts with bash here documents
  • 10 months stop searching for repository root when .git / .hg is found
  • 10 months Update the Python Style guide pyguide.html from Google's internal version.
  • 10 months Guard check does not follow Google Style
  • 11 months cpplint.py requires a particular python version and fails silently with a different version
  • 11 months Update JavaScript Reference for ES2015 (ES6)
  • 12 months Phpstorm - "in function expression" not unchecked
  • about 1 year cpplint does not detect build/header_guard error for .cuh files
  • about 1 year Document lambda formatting for Java 8
  • about 1 year TypeScript
  • about 1 year Eclipse Java Indent Size Is Wrong
  • about 1 year Can cpplint support a empty NOLINT apply to the next line?
  • over 1 year Update cpplint
  • over 1 year shell style linter
  • over 1 year can I analysis newly added lines in my legacy code
  • over 1 year check header guard variable for more extensions then "h"
  • over 1 year header guards from different files might be the same?
styleguide open pull requests (View All Pulls)
  • Minor English tweak
  • Set default 80 for Emacs fill-paragraph
  • Make cpplint less hardcoded to '.cc' (e.g. support '.cpp')
  • Modernize IntelliJ style file
  • Update link in javascript style guide. Javascript closures
  • Using namespace literals
  • instead of checking for an exact extension (.h / .cc) only check that it starts with .h / .c
  • Link to C++ Style Guide broken
  • minor patches for cpplint
  • Change cppguide.xml to proper XML serialized HTML
  • Add Java code style for IntelliJ 15
  • Explicit variadic constructors
  • Use Java 7 diamond operator in example Java style code
  • Single line lambdas
  • Fixed cppguide.xml redirect.
  • Add "typeid" in the exclusion list in CheckCStyleCast"
  • Fix #27 by enabling formatter on/off tags
  • Fix static import ordering.
  • Add java indent options for newer idea releases.
  • Add package tld io to intellij import layout.
  • Fix running cpplint.py from the Windows command line
  • google_python_style.vim: indent once inside parens
  • Remove BOM
  • Static imports imported first
  • Ignore Doxygen Long Lines
  • Python3000
  • Customize indent for access keywords.
  • Added an extensible set() for header extensions
  • Added the extensions option to the CPPLINT.cfg option file
  • Make output appear in the Visual Studio Error List
  • Don't replace - with _ in header names prior to sorting.
  • Replaced HTTP where HTTPS was available
  • Remove trailing whitespaces and a false claim in the JavaScript Style Guide
  • Sync Java IDE styles with internal configuration
  • Rephrase the last paragraph in Local Variables section of cppguide.html to make it more clear
  • Update README.md with JSON Style Guide
  • CppLint: Make "root" flag configurable via CPPLINT.cfg
  • Fixed a typo in pyguide.html
  • shell guide : "Parting words" from cppguide link ends with an error
  • Adding io.* to IMPORT_LAYOUT_TABLE in IntelliJ style
  • 添加Google Java Style中文版
  • Fix regex escape issue when using --root on Windows
  • Bug-fix: NOLINT, NOLINTNEXTLINE has no effect if used for the closing-brace line "};" in the lambda declaration.
  • Fix broken link
  • Changed stream from stderr to stdout for successful processing
  • pyguide -- Fix broken URL
  • Summarized Pull Request IntelliJ 2016
  • Fix spelling of errormessage in argument parsing
  • Add --quiet command line argument
  • Update broken link
  • Update Java style guide
  • Enabling formatter on/off tags
  • Java indent configuration by fileType use JAVA key instead of java
  • Add favicons to guides that lacked them
  • Fix the `cpplint.py` `build/endif_comment` check.
  • consistent pointer spacing within a file
  • Allow space before C++11 attributes
  • Extended CStyleCast regular expressions
  • Settings for IntelliJ IDEA Ultimate 2016
  • Correct a spelling mistake in the cppguide
  • Revert "Revert "Fix the `cpplint.py` `build/endif_comment` check.""
  • Merge pull request #187 from google/revert-169-gh-pages
  • Update Java and C++ style guides with various changes since last update
  • Update and replace JavaScript style guide.
  • Remove default list params in `cpplint.py`
  • cpplint: Decode filename path
  • Issue #226: Update Google Java Style Guide to clearly articulate section 5.2.6
  • Revert "Revert "Fix the `cpplint.py` `build/endif_comment` check.""
  • Add the tokens `signed` and `unsigned` to the definition of a type.
  • Tidied up the readme slightly for readability
  • Fix false positive alarms on missed <algortihm> or <utility> header.
styleguide questions on Stackoverflow (View All Questions)
  • python styleguide pep 8 . multiline multicolumn dict
  • How does the styleguide generate template work?
  • Elements in KSS Styleguide won't get styled
  • How do I create a "live" styleguide for my project in PHP.Gt?
  • Implementing Styledown to Auto Generate a Styleguide
  • Material-Design-Lite, Override styleguide property without !important
  • Styleguide when coding in a static language
  • PL/pgSQL styleguide
  • AngularJS best practices - Styleguide
  • Where does QMessageBox get its styleguide, font-size, ... from?
  • A styleguide for a web app's client-server communication
  • Issue with image referencing when generating a styleguide using kss-node
  • Grunt.js with grunt-styleguide and compass
  • KSS - Generating a styleguide with KSS-Node and Grunt
  • JavaScript styleguide on organizing files
  • Github's CSS Styleguide
  • Is there any serious MySQL naming styleguide?
  • Grunt task styleguide styledocco
  • KSS styleguide generator in PHP?
  • How do I get Android Styleguide Switches in Appcelerator?
  • c++ styleguide: why to have non-lvalues on the left side?
  • XAML documentation styleguide
  • Is there a styleguide for developing SWT applications?
styleguide list of languages used
Other projects in HTML