Skip to content

google/styleguide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 also contains google-c-style.el, an Emacs settings file for Google style.

We used to host the cpplint tool, but we stopped making internal updates public. An open source community has forked the project, so users are encouraged to use https://github.com/cpplint/cpplint instead.

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 guide lives outside of this project:

Since projects are largely maintained in a VCS, writing good commit messages is important to long term project health. Please refer to How to Write a Git Commit Message as an excellent resource. While it explicitly refers to the Git SCM, its principles apply to any system, and many Git conventions are trivial to translate to others.

Contributing

With few exceptions, these style guides are copies of Google's internal style guides to assist developers working on Google owned and originated open source projects. Changes to the style guides are made to the internal style guides first and eventually copied into the versions found here. External contributions are not accepted. Pull requests are regularly closed without comment.

People can file issues using the GitHub tracker. Issues that raise questions, justify changes on technical merits, or point out obvious mistakes may get some engagement and could in theory lead to changes, but we are primarily optimizing for Google's internal needs.

Creative Commons License

About

Style guides for Google-originated open-source projects

Topics

Resources

License

Code of conduct

Security policy

GitHub · Build and ship software on a single, collaborative platform · GitHub
Skip to content

Build and ship software on a single, collaborative platform

Join the world’s most widely adopted AI-powered developer platform.

Try GitHub Copilot

GitHub features

A demonstration animation of a code editor using GitHub Copilot Chat, where the user requests GitHub Copilot to refactor duplicated logic and extract it into a reusable function for a given code snippet.

Build code quickly and more securely with GitHub Copilot embedded throughout your workflows.

GitHub is used by

ShopifyEYFigmaDuolingoNew York TimesMercado LibreAmerican AirlinesFordMercedes BenzSociété GénéraleVodafonePhilipsSAPInfosysSpotify

Accelerate performance

With GitHub Copilot embedded throughout the platform, you can simplify your toolchain, automate tasks, and improve the developer experience.

A Copilot chat window with extensions enabled. The user inputs the @ symbol to reveal a list of five Copilot Extensions. @Sentry is selected from the list, which shifts the window to a chat directly with that extension. There are three sample prompts at the bottom of the chat window, allowing the user to Get incident information, Edit status on incident, or List the latest issues. The last one is activated to send the prompt: @Sentry List the latest issues. The extension then lists several new issues and their metadata.

Work 55% faster.Jump to footnote 1 Increase productivity with AI-powered coding assistance, including code completion, chat, and more.

Duolingo boosts developer speed by 25% with GitHub Copilot

Read customer story

2024 Gartner® Magic Quadrant™ for AI Code Assistants

Read report

Optimize your process with simple and secured CI/CD.

A list of workflows displays a heading ‘45,167 workflow runs’ at the top. Below are five rows of completed workflows accompanied by their completion time and their duration formatted in minutes and seconds.Discover GitHub Actions

Built-in application security
where found means fixed

Use AI to find and fix vulnerabilities—freeing your teams to ship more secure software faster.

Apply fixes in seconds. Spend less time fixing vulnerabilities and more time building features with Copilot Autofix.

Copilot Autofix identifies vulnerable code and provides an explanation, together with a secure code suggestion to remediate the vulnerability.

Solve security debt. Leverage AI-assisted security campaigns to reduce application vulnerabilities and zero-day attacks.

Discover security campaigns
A security campaign screen displays the campaign’s progress bar with 97% completed of 701 alerts. A total of 23 alerts are left with 13 in progress, and the campaign started 20 days ago. The status below shows that there are 7 days left in the campaign with a due date of November 15, 2024.

Dependencies you can depend on. Update vulnerable dependencies with supported fixes for breaking changes.

Learn about Dependabot
List of dependencies defined in a requirements .txt file.

Your secrets, your business: protected. Detect, prevent, and remediate leaked secrets across your organization.

Read about secret scanning
GitHub push protection confirms and displays an active secret, and blocks the push.

Work together, achieve more

Collaborate with your teams, use management tools that sync with your projects, and code from anywhere—all on a single, integrated platform.

A project management dashboard showing tasks for the ‘OctoArcade Invaders’ project, with tasks grouped under project phase categories like ‘Prototype,’ ‘Beta,’ and ‘Launch’ in a table layout. One of the columns displays sub-issue progress bars with percentages for each issue.

Your workflows, your way. Plan effectively with an adaptable spreadsheet that syncs with your work.

It helps us onboard new software engineers and get them productive right away. We have all our source code, issues, and pull requests in one place... GitHub is a complete platform that frees us from menial tasks and enables us to do our best work.
Fabian FaulhaberApplication manager at Mercedes-Benz

Create issues and manage projects with tools that adapt to your code.

Display of task tracking within an issue, showing the status of related sub-issues and their connection to the main issue.Explore GitHub Issues

Millions of developers and businesses call GitHub home

Whether you’re scaling your development process or just learning how to code, GitHub is where you belong. Join the world’s most widely adopted AI-powered developer platform to build the technologies that redefine what’s possible.

Footnotes

  1. Survey: The AI wave continues to grow on software development teams, 2024.

  2. This 7X times factor is based on data from the industry’s longest running analysis of fix rates Veracode State of Software Security 2023, which cites the average time to fix 50% of flaws as 198 days vs. GitHub’s fix rates of 72% of flaws with in 28 days which is at a minimum of 7X faster when compared.

Stars

Watchers

Forks