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 12770
Number of open issues 176
Average time to close an issue 29 days
Main language HTML
Average time to merge a PR 4 days
Open pull requests 96+
Closed pull requests 28+
Last commit 15 days ago
Repo Created almost 3 years ago
Repo Last Updated 11 days ago
Size 1.82 MB
Organization / Authorgoogle
Contributors9
Page Updated
Do you use styleguide? Leave a review!
View open issues (176)
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 (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

styleguide open issues Ask a question     (View All Issues)
  • over 1 year Suggest adding "private static Function..." to java constants examples
  • over 1 year C++ Style Guide: 64-bit Portability conflicts with Integer Types section
  • over 1 year runtime/explicit doesn't appear with particular class ctor
  • over 1 year google-c-style.el not properly indenting with class member initializer
  • over 1 year cpplint: virtual and final are flagged as an error
  • over 1 year False positive: Add #include <algorithm> for sort
  • over 1 year Incorrect import for Intellij 2016.2
  • over 1 year Add index.html to make http://google.github.io/styleguide/ browsable
  • over 1 year cpplint: readability/function error not thrown with multiple arguments.
  • over 1 year cpplint does not understand C++11 attributes
  • over 1 year Error with installing eclipse-java-google-style.xml
  • over 1 year htmlcssguide error : no comments above doctpye
  • over 1 year Link in Objective-C Guide returns 404
  • over 1 year shell styleguide conflicts with bash here documents
  • over 1 year stop searching for repository root when .git / .hg is found
  • over 1 year Update the Python Style guide pyguide.html from Google's internal version.
  • over 1 year Guard check does not follow Google Style
  • almost 2 years cpplint.py requires a particular python version and fails silently with a different version
  • almost 2 years Update JavaScript Reference for ES2015 (ES6)
  • almost 2 years Phpstorm - "in function expression" not unchecked
  • almost 2 years cpplint does not detect build/header_guard error for .cuh files
  • almost 2 years Document lambda formatting for Java 8
  • about 2 years TypeScript
  • about 2 years Eclipse Java Indent Size Is Wrong
  • about 2 years Can cpplint support a empty NOLINT apply to the next line?
  • about 2 years Update cpplint
  • about 2 years shell style linter
  • about 2 years can I analysis newly added lines in my legacy code
  • over 2 years check header guard variable for more extensions then "h"
  • over 2 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
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