From cfc13ff82c38f17f36a82baebdc3e6110ccadf24 Mon Sep 17 00:00:00 2001 From: MH Hung Date: Tue, 9 Sep 2025 10:59:25 +0800 Subject: [PATCH] feat(clang): init project --- .clang-format | 0 .clang-tidy | 0 CMakeLists.txt | 0 README.md | 19 +++++++++++++++++++ azure-pipelines.yml | 0 docs/coding-standards.md | 0 docs/linter-setup.md | 0 scripts/run-linter.sh | 0 scripts/setup-hooks.sh | 0 src/main.cpp | 0 src/utils.cpp | 0 src/utils.h | 0 tests/test_main.cpp | 0 13 files changed, 19 insertions(+) create mode 100644 .clang-format create mode 100644 .clang-tidy create mode 100644 CMakeLists.txt create mode 100644 azure-pipelines.yml create mode 100644 docs/coding-standards.md create mode 100644 docs/linter-setup.md create mode 100644 scripts/run-linter.sh create mode 100644 scripts/setup-hooks.sh create mode 100644 src/main.cpp create mode 100644 src/utils.cpp create mode 100644 src/utils.h create mode 100644 tests/test_main.cpp diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..e69de29 diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..e69de29 diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 63fee05..281dbe0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # cpp-linter-template +## 專案結構 +cpp-linter-template/ +├── .clang-tidy # linter 配置檔 +├── .clang-format # 格式化配置檔 +├── azure-pipelines.yml # Azure DevOps CI/CD 配置 +├── CMakeLists.txt # 建構配置 +├── README.md # 專案說明 +├── docs/ # 文件目錄 +│ ├── linter-setup.md # Linter 設定指南 +│ └── coding-standards.md # 編碼標準 +├── src/ # 原始碼 +│ ├── main.cpp # 主程式(含各種測試案例) +│ ├── utils.cpp # 工具函數 +│ └── utils.h # 標頭檔 +├── tests/ # 測試程式碼 +│ └── test_main.cpp # 簡單測試 +└── scripts/ # 輔助腳本 + ├── run-linter.sh # 本地執行 linter + └── setup-hooks.sh # 設定 git hooks \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..e69de29 diff --git a/docs/coding-standards.md b/docs/coding-standards.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/linter-setup.md b/docs/linter-setup.md new file mode 100644 index 0000000..e69de29 diff --git a/scripts/run-linter.sh b/scripts/run-linter.sh new file mode 100644 index 0000000..e69de29 diff --git a/scripts/setup-hooks.sh b/scripts/setup-hooks.sh new file mode 100644 index 0000000..e69de29 diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/utils.cpp b/src/utils.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/utils.h b/src/utils.h new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_main.cpp b/tests/test_main.cpp new file mode 100644 index 0000000..e69de29