feat(v11): CI/CD + regression tests + fuzzing + benchmarks + code quality
v11.1 — Test Infrastructure (14 files): - .github/workflows/ci.yml: Ubuntu 22.04 + GCC 11, auto ctest on push - tests/regression/: degenerate geometry, extreme coords, thin wall, large models - tests/fuzz/: SDF random CSG, random booleans, format round-trip, continuous mode - tests/benchmark/: boolean perf, MC perf, IO perf benchmarks - docs/benchmark-report.md: benchmark template v11.2 — Code Quality + Docs: - .clang-tidy: 15 check categories, 22 exclusions - .github/workflows/static-analysis.yml: clang-tidy CI scan - CODEOWNERS, SECURITY.md - docs: API overview, testing guide, contributing guide - README: module capability overview table Pending: binary formats + curve projection (retrying)
This commit is contained in:
+99
-10
@@ -1,44 +1,133 @@
|
||||
# ── ViewDesignEngine clang-tidy 配置 ──────────────────────────────
|
||||
# C++17 CAD 几何引擎静态分析规则集
|
||||
#
|
||||
# 校验要求:
|
||||
# Checks: clang-tidy-14 / clang-tidy-18
|
||||
# FormatStyle: file (.clang-format 优先)
|
||||
# HeaderFilterRegex: 只分析项目头文件,不检查 Eigen/GTest 等第三方头文件
|
||||
# WarningsAsErrors: 'bugprone-*,cert-*,misc-use-after-move,performance-*'
|
||||
|
||||
Checks: >
|
||||
-*,
|
||||
bugprone-*,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-bugprone-narrowing-conversions,
|
||||
cert-*,
|
||||
-cert-err58-cpp,
|
||||
clang-analyzer-*,
|
||||
cppcoreguidelines-*,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-type-vararg,
|
||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
google-*,
|
||||
-google-readability-todo,
|
||||
-google-runtime-references,
|
||||
misc-*,
|
||||
-misc-include-cleaner,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-misc-no-recursion,
|
||||
modernize-*,
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-use-nodiscard,
|
||||
performance-*,
|
||||
portability-*,
|
||||
readability-*,
|
||||
-readability-magic-numbers,
|
||||
-readability-identifier-length
|
||||
-readability-identifier-length,
|
||||
-readability-function-cognitive-complexity,
|
||||
-readability-isolate-declaration,
|
||||
|
||||
WarningsAsErrors: >
|
||||
bugprone-*,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-bugprone-narrowing-conversions,
|
||||
cert-*,
|
||||
clang-analyzer-*,
|
||||
performance-*,
|
||||
|
||||
HeaderFilterRegex: 'include/vde/.*\.h$'
|
||||
|
||||
FormatStyle: file
|
||||
|
||||
CheckOptions:
|
||||
- key: readability-identifier-naming.NamespaceCase
|
||||
value: lower_case
|
||||
# ── 命名约定 ──
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.StructCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.FunctionCase
|
||||
value: lower_case
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.VariableCase
|
||||
value: lower_case
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.MemberCase
|
||||
value: lower_case
|
||||
value: camelBack
|
||||
- key: readability-identifier-naming.MemberSuffix
|
||||
value: _
|
||||
value: '_'
|
||||
- key: readability-identifier-naming.EnumCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.EnumConstantCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.EnumConstantPrefix
|
||||
value: k
|
||||
- key: readability-identifier-naming.NamespaceCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.TemplateParameterCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.TypeAliasCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.GlobalConstantCase
|
||||
value: UPPER_CASE
|
||||
- key: readability-identifier-naming.StaticConstantCase
|
||||
value: UPPER_CASE
|
||||
- key: readability-identifier-naming.ConstexprVariableCase
|
||||
value: UPPER_CASE
|
||||
- key: readability-identifier-naming.MacroDefinitionCase
|
||||
value: UPPER_CASE
|
||||
|
||||
WarningsAsErrors: ""
|
||||
# ── 现代 C++ 检查 ──
|
||||
- key: modernize-use-auto.MinTypeNameLength
|
||||
value: '8'
|
||||
- key: modernize-use-auto.RemoveStars
|
||||
value: 'true'
|
||||
- key: modernize-use-emplace.ContainersWithPushBack
|
||||
value: 'std::vector;std::list;std::deque'
|
||||
- key: modernize-loop-convert.UseCxx20ReverseRanges
|
||||
value: 'true'
|
||||
- key: modernize-pass-by-value.ValuesOnly
|
||||
value: 'true'
|
||||
|
||||
# ── 性能检查 ──
|
||||
- key: performance-move-const-arg.CheckTriviallyCopyableMove
|
||||
value: 'true'
|
||||
- key: performance-for-range-copy.WarnOnAllAutoCopies
|
||||
value: 'true'
|
||||
- key: performance-unnecessary-value-param.AllowedTypes
|
||||
value: ''
|
||||
|
||||
# ── 代码准则 ──
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
|
||||
value: 'true'
|
||||
|
||||
# ── 杂项 ──
|
||||
- key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
|
||||
value: 'true'
|
||||
|
||||
# ── bug 检测 ──
|
||||
- key: bugprone-argument-comment.StrictMode
|
||||
value: 'false'
|
||||
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
|
||||
value: ''
|
||||
|
||||
# ── 可读性 ──
|
||||
- key: readability-function-size.LineThreshold
|
||||
value: '-1'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: readability-function-size.BranchThreshold
|
||||
value: '-1'
|
||||
- key: readability-function-size.ParameterThreshold
|
||||
value: '-1'
|
||||
- key: readability-simplify-subscript-expr.Types
|
||||
value: '::std::vector;::std::array'
|
||||
|
||||
Reference in New Issue
Block a user