登录 注册

styleguide

去点 Star
开发者工具 cpplintstyle-guidestyleguide
39,817
Stars
12,920
Forks
1,236
Watchers
87
Open Issues
NOASSERTION
许可证
Emacs Lisp
语言
2015-05-20
创建时间
2026-11-11
最近更新

项目能做什么

Google 开源项目的官方代码风格规范与指南。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# 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](https://github.com/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.

*   [Angular Style Guide][angular]
*   [Common Lisp Style Guide][cl]
*   [C++ Style Guide][cpp]
*   [C# Style Guide][csharp]
*   [Effective Dart][dart]
*   [Go Style Guide][go]
*   [Haskell Style Guide][haskell]
*   [HTML/CSS Style Guide][htmlcss]
*   [JavaScript Style Guide][js]
*   [Java Style Guide][java]
*   [JSON Style Guide][json]
*   [Kotlin Style Guide][kotlin]
*   [Markdown Style Guide][markdown]
*   [Objective-C Style Guide][objc]
*   [Python Style Guide][py]
*   [R Style Guide][r]
*   [Rust Style Guide][rust]
*   [Shell Style Guide][sh]
*   [Swift Style Guide][swift]
*   [TCL/TK Style Guide][tcltk]
*   [TypeScript Style Guide][ts]
*   [Verilog Style Guide][verilog]
*   [Vim script Style Guide][vim]
*   [XML Document Format Style Guide][xml]

## Source Code Management

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](https://cbea.ms/git-commit/) 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.

## Editors & Tools

Google engineers use a wide variety of editors & IDEs.

*   Eclipse & IntelliJ
    *   C++: [eclipse-cpp-google-style.xml](./eclipse-cpp-google-style.xml)
    *   Java: <https://github.com/google/google-java-format>
*   Emacs: [google-c-style.el][emacs]
*   Vim: <https://github.com/google/vim-codefmt>
    *   Python: [google_python_style.vim](./google_python_style.vim)

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.

## 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.

While many of these guides are hosted directly in this project, others might be
hosted in other projects. Sometimes those projects are also maintained by
Google, some
阅读完整原文

商业机会分析 AI 生成

Google Style 自动化合规与自动修复 GitHub/GitLab App

产品构想将 Google 规范封装为即插即用的代码审查机器人,在 Pull Request 中不仅标记出违背 Google 规范的地方,并能一键生成自动修复(Auto-fix)的 PR。
核心功能一键集成代码仓库;多语言支持(C++、Python、Java 等规范);PR 自动分析与内联评论;一键提交修复代码;定制白名单与自定义规则覆盖
目标用户使用 GitHub/GitLab 进行日常协作的中小型研发团队、开源项目维护者
难度/周期中等 · 4-6 周 · 成本:月均服务器/API成本约 30-100 美元(初期微型云主机即可)
收费模式免费增值模式(Freemium):开源项目免费,私有仓库按席位或代码审查量收取月度订阅费(如 $10/席位/月)
竞争风险市场上已有 Super-linter、SonarQube 等通用静态分析工具竞争;自动修复若出现语法微调可能引入新 Bug
依据 已验证事实(Google Style 是业内最广泛采用的规范之一,cpplint 被广泛使用)

跨 IDE 规范配置一键同步与管理平台

产品构想提供一个可视化平台,允许团队基于 Google 规范一键生成并分发统一的 IDE 配置文件(如 VSCode、CLion、IntelliJ 的 settings/clang-format/editorconfig),并监控团队同步状态。
核心功能可视化的规范定制与继承树(基于 Google Base 派生);一键导出 clang-format、eslint、flake8 等配置文件;CLI 工具一键同步至本地开发者环境;配置漂移预警
目标用户多 IDE 并存团队的技术主管(Lead)、效能工程师
难度/周期低 · 2-4 周 · 成本:静态页面与微服务架构,初期成本低于 20 美元/月
收费模式按团队规模订阅收费(如 $29/月 支持最多 20 人团队规范同步)
竞争风险用户粘性相对较低,容易被团队用 Git 仓库加公共配置文件直接取代
依据 AI推测

大厂工程规范落地与代码质量评估体系(B端咨询/培训产品)

产品构想基于 Google Style Guide 的深层工程思想,打包成面向企业交付质量提升的培训课程、评估指标套件与落地咨询服务。
核心功能Google 编码规范实战视频与训练营;团队代码基线体检与合规度评分诊断报告;渐进式规范推行落地方案与 CI 拦截策略模板
目标用户传统企业数字化转型研发部门、软件外包企业交付团队
难度/周期低(偏重内容生产与交付) · 3-5 周 · 成本:极低(仅需内容制作工具与时间成本)
收费模式企业内训/咨询客单价收费($1000 - $5000/次),或数字课件单独销售
竞争风险高度依赖个人品牌和销售渠道获客,难以规模化复制
依据 数据支持的判断(39k+ Stars 表明市场对 Google 规范认同度极高,但中小团队往往缺乏落地执行力)
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
cpplint/cpplint 中文介绍暂未生成
Linter for C++ based on Google's style guide
1,862 Python
sakura-editor/sakura 中文介绍暂未生成
SAKURA Editor (Japanese text editor for MS Windows)
1,507 C++
pocc/pre-commit-hooks 中文介绍暂未生成
C/C++ hooks to integrate with pre-commit
403 Python
ColorCop/ColorCop 中文介绍暂未生成
A lightweight Windows color picker with multi-format output
243 C++
tomasbjerre/violations-lib 中文介绍暂未生成
Java library for parsing report files from static code analy
160 Java
wangzw/CppStyle 中文介绍暂未生成
An Eclipse plugin that integrates clang-format and cpplint (
75 Java
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2015-05-20,近 30 天仍在推送
社区活跃Star 39,817 / Fork 12,920 / Issue 87(数据支持,可自行核实)
许可证NOASSERTION
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/google/styleguide.git
cd styleguide
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。