-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpp_semantic_graph.yaml
More file actions
82 lines (71 loc) · 3.62 KB
/
Copy pathcpp_semantic_graph.yaml
File metadata and controls
82 lines (71 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# C++ 语义图谱工具 — 项目配置文件
# 换项目只改这个文件,不改代码
project:
name: "ap-aa 业务模块"
# compile_commands.json 路径(相对于项目根目录或绝对路径)
compile_commands: "/mnt/code1/adc4.0/drive-vendor/ap/ap-aa/compile_commands.json"
# 源码范围定义 — 决定哪些代码算"项目代码"
# 节点提取和调用关系过滤都基于此
source_paths:
# OTA 升级服务
- "hq_ota_service/src"
- "hq_ota_service/include"
# 诊断
- "hq_diag_app/src"
- "hq_diag_did_rid_app/src"
# DoIP
- "hq_doip_service/src"
# 日志
- "hq_eth_log_app/src"
- "hq_log_app/src"
# 状态管理 / 车辆服务
- "hq_state_manager/src"
- "hq_vehicle_service/src"
# util 公共库(did_access/service_base 为 header-only,随业务 TU #include 入库)
# 注1:用子目录枚举而非裸 "util",避免子串匹配误中 peri_utils/src/utils 等
# 注2:锚定到 "app/util/<name>" 而非裸 "util/<name>"——裸 "util/log" 会子串命中
# SDK 头 amsr/log/util/log.h,既误提取 8 个 amsr::log SDK 节点,又把路径截成 ".h"
- "app/util/did_access"
- "app/util/log"
- "app/util/service_base"
# 生成代码路径 — 头文件入库接口声明,源文件不入库
# 调用关系中,callee 在此范围内也保留
# 注:src-gen(ARA COM 生成代码)已移出——每次 AP 建模都变,占 43% 节点且不稳定,
# 业务查询用不到(业务继承 src-gen 0 边、业务调用 src-gen 仅 1 条错误码样板边)。
# 见 exclude_paths。如需恢复接口方法查询,把 "src-gen" 移回此处并重跑 full-parse。
generated_paths: []
# 完全忽略的路径 — 不解析不入库
exclude_paths:
- "thirdparty"
- "build"
- "test/mock"
- "src-gen" # ARA COM 生成代码:建模后频繁变化,排除以稳定业务图谱 + 加速增量解析
# 工具环境
libclang_path: "/usr/lib/llvm-18/lib/libclang.so.1"
# 交叉编译支持(aarch64 目标)
# libclang 默认按宿主 x86_64 解析,必须指定 -target 否则 sysroot 的 math-vector.h
# (NEON/SVE 内建类型 __neon_vector_type__/__SVFloat32_t) 会 fatal。
# toolchain_includes 指向交叉工具链的 C++ 标准库头目录(compile_commands 不带)。
target_triple: "aarch64-linux-gnu"
toolchain_includes:
- "/mnt/code1/adc4.0/toolchains/aarch64--glibc--bleeding-edge-2024.02-1/aarch64-buildroot-linux-gnu/include/c++/13.2.0"
- "/mnt/code1/adc4.0/toolchains/aarch64--glibc--bleeding-edge-2024.02-1/aarch64-buildroot-linux-gnu/include/c++/13.2.0/aarch64-buildroot-linux-gnu"
# 解析选项
parse_options:
# 是否跳过函数体(加速解析,但无法提取调用关系)
skip_function_bodies: false
# 并行解析的最大进程数(1=串行,内存最低)
max_workers: 8 # 16 核机器,并行 8 worker(full-parse ~6 分钟 vs 串行 19 分钟)
# 模板白名单(可选,不配则所有模板只导出定义)
template_whitelist: "config/template_whitelist.yaml"
# 文档配置(阶段 3)
docs_config: "config/doc_config.yaml"
# 文档根目录(相对于此配置文件所在目录,或绝对路径)
# 迁移到 /mnt/code1/cpp_semantic_graph 后用绝对路径,避免 ../../docs 解析到 /mnt/docs
docs_dir: "/mnt/code1/adc4.0/drive-vendor/ap/ap-aa/app/hq_ota_service/docs"
# 惰性增量(task_4_5: MCP 查询时检测新 commit 才增量,同一 commit no-op)
# enabled: true=开启(MCP 查询时 rev-parse 节流);false=仅手动 CLI incremental
# threshold: 变更文件数超此值跳过同步增量(降级提示手动跑),避免阻塞查询过久
lazy_increment:
enabled: true
threshold: 20