# zh-google-styleguide/zh-google-styleguide

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/zh-google-styleguide-zh-google-styleguide).**

10,977 stars · 2,806 forks · Makefile

## Links

- GitHub: https://github.com/zh-google-styleguide/zh-google-styleguide
- Homepage: http://zh-google-styleguide.readthedocs.org/
- awesome-repositories: https://awesome-repositories.com/repository/zh-google-styleguide-zh-google-styleguide.md

## Description

This project is a software engineering reference that provides a cross-language formatting standard and industry-standard practices for architectural patterns, memory management, and identifier naming. Its primary purpose is to implement a unified set of indentation and whitespace rules applied consistently across multiple distinct programming environments.

The project specializes in technical documentation localization, providing Chinese language translations of official programming style guides. It maps original English coding standards to Chinese language references to maintain meaning across localized documentation for languages including C++, Java, Python, and TypeScript.

The scope covers multi-language coding standards and web development guidelines, including semantic markup for HTML and property organization for CSS. It also addresses software architecture through design pattern implementation and memory-ownership model specifications.

The project uses reStructuredText sources and Sphinx to generate the style guides into HTML, PDF, and CHM formats.

## Tags

### Software Engineering & Architecture

- [Cross-Language Formatting Standards](https://awesome-repositories.com/f/software-engineering-architecture/cross-language-formatting-standards.md) — Implements a unified set of indentation and whitespace rules applied consistently across multiple distinct programming environments.
- [Chinese Language Localizations](https://awesome-repositories.com/f/software-engineering-architecture/programming-style-guides/chinese-language-localizations.md) — Provides Chinese language translations of official programming style guides for multiple languages. ([source](https://cdn.jsdelivr.net/gh/zh-google-styleguide/zh-google-styleguide@master/README.md))
- [Coding Convention Specifications](https://awesome-repositories.com/f/software-engineering-architecture/coding-convention-specifications.md) — Maps general coding principles to specific syntax rules for languages including Java, C++, Python, and TypeScript.
- [C++](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards/c.md) — Defines consistent rules for C++ header organization and class structure to keep the codebase uniform. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/contents.html))
- [JavaScript](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards/javascript.md) — Provides a set of translated coding conventions and formatting rules to ensure JavaScript consistency and readability. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-javascript-styleguide/))
- [TypeScript Standards](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards/typescript-standards.md) — Provides translated coding conventions and structural standards for TypeScript. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-typescript-styleguide/))
- [Java Coding Standards](https://awesome-repositories.com/f/software-engineering-architecture/dotnet-code-style-standards/java-coding-standards.md) — Applies a consistent set of formatting and naming conventions to Java source code to improve readability. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-java-styleguide/))
- [Identifier Casing Enforcement](https://awesome-repositories.com/f/software-engineering-architecture/identifier-casing-enforcement.md) — Defines specific capitalization and word-separation patterns for constants, classes, and variables to ensure identifier predictability.
- [Multi-Language Reference Standards](https://awesome-repositories.com/f/software-engineering-architecture/language-agnostic-naming-standards/multi-language-reference-standards.md) — Provides a unified Chinese reference for naming and formatting rules across C++, Java, Python, and TypeScript.
- [Naming Conventions](https://awesome-repositories.com/f/software-engineering-architecture/naming-conventions.md) — Specifies exact naming patterns for files, types, and variables to maintain identifier predictability. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/contents.html))
- [Python Coding Standards](https://awesome-repositories.com/f/software-engineering-architecture/python-coding-standards.md) — Defines consistent naming and structural conventions to keep Python code readable across codebases. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/contents.html))
- [Software Engineering Standards](https://awesome-repositories.com/f/software-engineering-architecture/software-engineering-standards.md) — Implements industry standard practices for architectural patterns, memory management, and identifier naming.
- [Web Development Standards](https://awesome-repositories.com/f/software-engineering-architecture/web-development-standards.md) — Defines consistent formatting and naming conventions for HTML, CSS, and JavaScript.
- [Architectural Patterns](https://awesome-repositories.com/f/software-engineering-architecture/architectural-patterns.md) — Prescribes the use of specific architectural patterns like MVC and Delegation to organize software components.
- [Code Documentation Standards](https://awesome-repositories.com/f/software-engineering-architecture/code-documentation-standards.md) — Uses JSDoc standardized comment syntax and tag systems to document code for automated tools. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-javascript-styleguide/contents.html))
- [Design Pattern Implementations](https://awesome-repositories.com/f/software-engineering-architecture/design-pattern-implementations.md) — Applies architectural patterns to organize the structural components of software. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-objc-styleguide/contents.html))
- [API Documentation Annotations](https://awesome-repositories.com/f/software-engineering-architecture/documentation-driven-standards/api-documentation-annotations.md) — Provides a system of standardized comment tags and markers to ensure a consistent structure for automated API documentation.
- [Memory Leak Prevention](https://awesome-repositories.com/f/software-engineering-architecture/memory-usage-analysis/memory-leak-prevention.md) — Defines explicit rules for object lifecycle and resource cleanup mechanisms to prevent memory leaks.

### Part of an Awesome List

- [Programming Practice Guidelines](https://awesome-repositories.com/f/awesome-lists/devtools/code-quality-linting/programming-practice-guidelines.md) — Prescribes coding habits regarding exception handling and annotation usage to improve overall code quality. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-java-styleguide/contents.html))
- [Code Formatting and Style](https://awesome-repositories.com/f/awesome-lists/devtools/code-formatting-and-style.md) — Formats Java source files using standard conventions to ensure visual styles remain consistent across projects. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-java-styleguide/))

### Development Tools & Productivity

- [Formatting Rules](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/code-formatting-utilities/formatting-rules.md) — Sets precise rules for line length, indentation, and whitespace to improve visual readability of source code. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/contents.html))
- [Language-Specific Style Rules](https://awesome-repositories.com/f/development-tools-productivity/rule-definition-languages/ast-style-rule-definitions/language-specific-style-rules.md) — Defines detailed formatting, naming, and structural rules for various programming languages. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/))
- [Documentation Guidelines](https://awesome-repositories.com/f/development-tools-productivity/documentation-guidelines.md) — Establishes a uniform style for file, class, and function comments, including legal notices. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/contents.html))
- [Documentation Standards](https://awesome-repositories.com/f/development-tools-productivity/documentation-standards.md) — Implements standardized comment tags and markers to ensure consistent structure for automated API documentation.
- [Shell Script Coding Standards](https://awesome-repositories.com/f/development-tools-productivity/shell-scripting-utilities/shell-script-coding-standards.md) — Defines naming conventions and structural patterns to keep shell scripts consistent. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-shell-styleguide/contents.html))
- [Static Code Linting](https://awesome-repositories.com/f/development-tools-productivity/static-code-linting.md) — Checks source code against a style guide using automated tools to flag formatting deviations. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/))

### Education & Learning Resources

- [Technical Documentation Localizations](https://awesome-repositories.com/f/education-learning-resources/technical-documentation-localizations.md) — Maps original English coding standards to Chinese references to maintain meaning across localized documentation.

### Mobile Development

- [Objective-C](https://awesome-repositories.com/f/mobile-development/coding-standards/objective-c.md) — Defines consistent rules for naming and structure to keep Objective-C codebases uniform. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-objc-styleguide/contents.html))

### Web Development

- [Web Code Formatting Standards](https://awesome-repositories.com/f/web-development/web-code-formatting-standards.md) — Defines consistent style conventions for formatting HTML and CSS source code. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-html-css-styleguide/))
- [Web Standards](https://awesome-repositories.com/f/web-development/web-standards.md) — Implements a set of coding conventions and formatting rules ensuring web content adheres to industry standards. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-html-css-styleguide/))

### Content Management & Publishing

- [Documentation Source Formats](https://awesome-repositories.com/f/content-management-publishing/restructuredtext-parsing/documentation-source-formats.md) — Uses reStructuredText as a structured text format to define content for various documentation outputs.
- [Static Site Generation](https://awesome-repositories.com/f/content-management-publishing/static-site-document-generators/static-site-generators/static-site-generation.md) — Transforms source text into searchable HTML, PDF, and CHM formats using Sphinx as a static site generator.

### Programming Languages & Runtimes

- [Type Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/type-system-tools/type-definitions.md) — Specifies types, conversions, and nullability for parameters and properties using a structured language. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-javascript-styleguide/contents.html))

### Testing & Quality Assurance

- [JavaScript and TypeScript Formatting](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/formatting-and-linting-pipelines/javascript-and-typescript-toolchains/javascript-and-typescript-formatting.md) — Enforces consistent formatting rules for JavaScript source files to improve visual clarity. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-javascript-styleguide/))

### User Interface & Experience

- [Semantic Markup Standards](https://awesome-repositories.com/f/user-interface-experience/graphical-user-interfaces/accessibility/accessible-content-structuring/semantic-markup-standards.md) — Provides guidelines for HTML element usage and CSS property ordering to improve accessibility and structure.
- [Markup Formatting Standards](https://awesome-repositories.com/f/user-interface-experience/graphical-user-interfaces/accessibility/accessible-content-structuring/semantic-markup-standards/markup-formatting-standards.md) — Establishes rules for document types and semantic element usage to ensure consistent HTML structure. ([source](https://zh-google-styleguide.readthedocs.io/en/latest/google-html-css-styleguide/contents.html))
