- 在線文檔托管在 ReadTheDocs : [在線閱讀最新版本](http://zh-google-styleguide.readthedocs.org/) [http://zh-google-styleguide.readthedocs.org/]
- 中文風格指南 GitHub 托管地址:[zh-google-styleguide](https://github.com/zh-google-styleguide/zh-google-styleguide) [https://github.com/zh-google-styleguide/zh-google-styleguide]
> Note
> 聲明.
> 本項目并非 Google 官方項目, 而是由國內程序員憑熱情創建和維護.
> 如果你關注的是 Google 官方英文版, 請移步 [Google Style Guide](http://code.google.com/p/google-styleguide/) [http://code.google.com/p/google-styleguide/]
每個較大的開源項目都有自己的風格指南: 關于如何為該項目編寫代碼的一系列約定 (有時候會比較武斷).當所有代碼均保持一致的風格, 在理解大型代碼庫時更為輕松.
“風格” 的含義涵蓋范圍廣, 從 “變量使用駝峰格式 (camelCase)” 到 “決不使用全局變量” 再到 “決不使用異常”.英文版項目維護的是在 Google 使用的編程風格指南. 如果你正在修改的項目源自 Google, 你可能會被引導至英文版項目頁面, 以了解項目所使用的風格.
我們已經發布了四份 **中文版** 的風格指南:
1. [Google C++ 風格指南](http://zh-google-styleguide.readthedocs.org/en/latest/google-cpp-styleguide/) [http://zh-google-styleguide.readthedocs.org/en/latest/google-cpp-styleguide/]
1. [Google Objective-C 風格指南](http://zh-google-styleguide.readthedocs.org/en/latest/google-objc-styleguide/) [http://zh-google-styleguide.readthedocs.org/en/latest/google-objc-styleguide/]
1. [Google Python 風格指南](http://zh-google-styleguide.readthedocs.org/en/latest/google-python-styleguide/) [http://zh-google-styleguide.readthedocs.org/en/latest/google-python-styleguide/]
1. [Google JSON 風格指南](https://github.com/darcyliu/google-styleguide/blob/master/JSONStyleGuide.md) [https://github.com/darcyliu/google-styleguide/blob/master/JSONStyleGuide.md]
中文版項目采用 reStructuredText 純文本標記語法, 并使用 Sphinx 生成 HTML / CHM / PDF 等文檔格式.
- 英文版項目還包含 [cpplint](http://google-styleguide.googlecode.com/svn/trunk/cpplint) [http://google-styleguide.googlecode.com/svn/trunk/cpplint] - 一個用來幫助適應風格準則的工具, 以及 [google-c-style.el](http://google-styleguide.googlecode.com/svn/trunk/google-c-style.el) [http://google-styleguide.googlecode.com/svn/trunk/google-c-style.el], Google 風格的 Emacs 配置文件.
- 另外, 招募自愿者翻譯 [JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) [http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml] 以及 [XML Document Format Style Guide](http://google-styleguide.googlecode.com/svn/trunk/xmlstyle.html) [http://google-styleguide.googlecode.com/svn/trunk/xmlstyle.html], 有意者請聯系 [brantyoung](http://yangyubo.com) [http://yangyubo.com].
? Copyright . Created using [Sphinx](http://sphinx-doc.org/) 1.3.1.
- Google 開源項目風格指南 (中文版)
- C++ 風格指南
- 0. 扉頁
- 1. 頭文件
- 2. 作用域
- 3. 類
- 4. 來自 Google 的奇技
- 5. 其他 C++ 特性
- 6. 命名約定
- 7. 注釋
- 8. 格式
- 9. 規則特例
- 10. 結束語
- Objective-C 風格指南
- Google Objective-C Style Guide 中文版
- 留白和格式
- 命名
- 注釋
- Cocoa 和 Objective-C 特性
- Cocoa 模式
- Python 風格指南
- Google Python 風格指南 - 中文版
- 背景
- Python語言規范
- Python風格規范
- 臨別贈言
- JSON 風格指南
- 簡介
- 定義
- 一般準則
- 屬性名準則
- 屬性值準則
- 屬性值數據類型
- JSON結構和保留屬性名
- 頂級保留屬性名稱
- data對象的保留屬性名
- 用于分頁的保留屬性名
- 用于鏈接的保留屬性名
- 錯誤對象中的保留屬性名
- 屬性順序
- 示例
- 附錄