Skip to content

feat: Add .editorconfig#16

Merged
Sunrisepeak merged 1 commit intomainfrom
add-editorconfig
Mar 7, 2026
Merged

feat: Add .editorconfig#16
Sunrisepeak merged 1 commit intomainfrom
add-editorconfig

Conversation

@FrozenLemonTee
Copy link
Member

该配置文件主要规范内容包括:

  • 使用 UTF-8 文件编码
  • 统一使用 LF 作为换行符
  • 统一缩进方式和缩进宽度
  • 自动删除行尾多余空格
  • 保证文件末尾存在换行

配置按文件类型(C/C++、CMake、Markdown、JSON/YAML、Python、Makefile 等)进行了分组,并为每个选项添加了对齐的行内注释,以提升可读性和可维护性。

该配置与 .clang-format 互为补充:.editorconfig 负责编辑器层面的基础格式行为,而 .clang-format 负责 C/C++ 代码的具体格式化规则。

Copy link
Member

@Sunrisepeak Sunrisepeak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Sunrisepeak Sunrisepeak merged commit 1317cac into main Mar 7, 2026
@Sunrisepeak Sunrisepeak deleted the add-editorconfig branch March 7, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants