Skip to main content

format

Format C++ code using clang-format

来源信息

仓库
spiriMirror/libuipc
最近来源活动
2026年3月6日 07:13
检测到的 SKILL.md 语言
英语
星标
335
分支
68

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
format
description
Format C++ code using clang-format
disable-model-invocation
true
# Format ## Overview Format C++ code using the `.clang-format` file in the project root. ## Format Changed Files Format only the files changed relative to `main`: ```bash git diff --name-only --diff-filter=ACMR main -- '*.h' '*.hpp' '*.cpp' '*.inl' '*.cu' '*.cuh' | xargs clang-format -i ``` ## Format a Specific File ```bash clang-format -i <file> ``` ## Format All C++ Files in a Directory ```bash find <directory> -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.cpp' -o -name '*.inl' -o -name '*.cu' -o -name '*.cuh' \) -exec clang-format -i {} + ```
在 GitHub 查看