Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


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 24951
Number of open issues 262
Average time to close an issue 29 days
Main language HTML
Average time to merge a PR 8 days
Open pull requests 126+
Closed pull requests 54+
Last commit 3 months ago
Repo Created over 5 years ago
Repo Last Updated 3 months ago
Size 2.24 MB
Homepage https://google.gi...
Organization / Authorgoogle
Page Updated
Do you use styleguide? Leave a review!
View open issues (262)
View styleguide activity
View TODOs for styleguide (19)
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
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 (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, C# Style Guide, Swift 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

styleguide open issues Ask a question     (View All Issues)
  • almost 4 years Suggest adding "private static Function..." to java constants examples
  • about 4 years C++ Style Guide: 64-bit Portability conflicts with Integer Types section
  • about 4 years runtime/explicit doesn't appear with particular class ctor
  • about 4 years google-c-style.el not properly indenting with class member initializer
  • about 4 years cpplint: virtual and final are flagged as an error
  • about 4 years False positive: Add #include <algorithm> for sort
  • about 4 years Incorrect import for Intellij 2016.2
  • about 4 years Add index.html to make http://google.github.io/styleguide/ browsable
  • about 4 years cpplint: readability/function error not thrown with multiple arguments.
  • about 4 years cpplint does not understand C++11 attributes
  • over 4 years Error with installing eclipse-java-google-style.xml
  • over 4 years htmlcssguide error : no comments above doctpye
  • over 4 years Link in Objective-C Guide returns 404
  • over 4 years shell styleguide conflicts with bash here documents
  • over 4 years stop searching for repository root when .git / .hg is found
  • over 4 years Update the Python Style guide pyguide.html from Google's internal version.
  • over 4 years Guard check does not follow Google Style
  • over 4 years cpplint.py requires a particular python version and fails silently with a different version
  • over 4 years Update JavaScript Reference for ES2015 (ES6)
  • over 4 years Phpstorm - "in function expression" not unchecked
  • over 4 years cpplint does not detect build/header_guard error for .cuh files
  • over 4 years Document lambda formatting for Java 8
  • over 4 years TypeScript
  • almost 5 years Eclipse Java Indent Size Is Wrong
  • almost 5 years Can cpplint support a empty NOLINT apply to the next line?
  • almost 5 years Update cpplint
  • almost 5 years shell style linter
  • almost 5 years can I analysis newly added lines in my legacy code
  • about 5 years check header guard variable for more extensions then "h"
  • about 5 years 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.
  • Stop at first root directory
  • Update JS style guide
  • Merge pull request #1 from google/gh-pages
  • Update cppguide.html
  • fix tag
  • Fix a typo
  • Add Support of folder
  • #320: That checks "Never join already wrapped lines"
  • Options for Kotlin (from Java)
  • Fix typo in comment in Py style guide.
  • add "return" to the compound literal exclusions
  • C++: "POD data" -> "POD"
  • (Eclipse formatter) Do not format html in Javadoc
  • (Eclipse formatter) Do not format Java file header comments
  • Update intellij-java-google-style.xml
  • Include run_prettify.js script and update all pre tags to use it
  • Cpplint: Specify Python version
  • C++ 17 string_view support
  • Allow break line between import groups
  • Ignore file header formatting on Java
  • Fix nerdy reference
  • Fixed "full hairy example" of formatting control string in Common Lisp style guide
  • Update cppguide to mention revision 432
  • Fix indentation check for access keywords
  • Intellij INDENT_ON_CONTINUATION needs to be true
  • C++: Do not use [=] or [=,this] to capture 'this'
  • C++ Style Guide: Remove redundant comment guideline
  • Add python 3 support to cpplint and cpplint_unittest
  • Add array and atomic to IWYU in cpplint
  • Fix naming style of method name in docstring example
  • some typing advice
  • Added "A blank line" as specified by the standard
  • Explicitly mention use of the styler R package
  • ignore alt_tokens when checking fncall spacing
  • Favicons have been added for all html pages
  • Converting README to README.md
  • Setting the 'New line after (' property to correctly match the code styleguide
  • Fix broken inline link
  • Make indentation consistent in pyguide.md
  • Escape backslashes in pydoc strings.
  • Fixed some typos; changed @ to pie, as in 'pie' notation.
  • Updated shebang recommendation for python files
  • Cleaning up the intellij-java-google-style.xml configuration file to …
  • [cpplint] modify unsafe thread function list
  • java eclipse formatter: Avoid wrapping explicit line breaks as supported in all recent versions of eclipse.
  • Fixing JSON syntax
  • Keyword 'override' can be now enforced by gcc or clang-tidy.
  • remove `<mutex>` from unapproved headers in cpplint
  • [cpplint] detection of broken std::regex in libstdc++
  • Adapt class decl regexp to match V8's decorators
  • google/styleguide#412: Java: 4.1.2 example: Missing opening brace in …
  • Update objcguide.md
  • fix duplicated sentence
  • add wrap_long_lines in intellij-java-google-style.xml
  • Added support for an 'access_indent' setting in CPPLINT.cfg
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
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark