feat(clang): add claude suggestion

This commit is contained in:
2025-09-09 11:11:53 +08:00
parent cfc13ff82c
commit d5350c35a8
9 changed files with 360 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
# 階段一:只檢查最關鍵的錯誤,適合舊代碼
Checks: '-*,
clang-analyzer-core.NullDereference,
clang-analyzer-core.DivideZero,
clang-analyzer-core.UndefinedBinaryOperatorResult,
bugprone-argument-comment,
bugprone-bool-pointer-implicit-conversion,
bugprone-dangling-handle,
bugprone-use-after-move,
readability-braces-around-statements,
readability-container-size-empty'
# 不將警告視為錯誤(階段一)
WarningsAsErrors: ''
# 包含所有標頭檔
HeaderFilterRegex: '.*'
# 分析設定
AnalyzeTemporaryDtors: false
FormatStyle: none
# 檢查參數
CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
value: '2'