UI 代码纳入规范检查:大括号 K&R 化、strcpy 换 memcpy 等违规修复

- pre-commit 配置:移除 Drivers/BSP/UI/ 整目录排除,14 个 UI 源文件全部受 cppcheck + 规范检查
- ui_net_sink.c:11 处 Allman 大括号归并 K&R,i/c 声明改即用
- ui_port.c:7 处大括号归并
- ui_net_sink_backend_mcu.c:2 处大括号归并
- ui_menu_view.c:menu_frame_t 指针改 const
- ui_page_net_cfg.c:6 处 strcpy 改 memcpy

验证:pre-commit 全钩子通过、模拟器 0 警、菜单/内容页像素回归 PASS、Keil 0 错 0 警
This commit is contained in:
2026-09-13 19:38:14 +08:00
parent cb8cea38b2
commit 34528a9798
6 changed files with 36 additions and 53 deletions
+1 -2
View File
@@ -57,11 +57,11 @@ repos:
language: system
types: [c]
# 仅扫描项目自有代码;排除第三方库与 LVGL 依赖文件
# (UI 生成文件 ui_font_cn_12/ui_menu_tab 由生成器按工程约定产出,纳入受检)
exclude: |
(?x)^(
Drivers/CMSIS/|
Drivers/STM32F4xx_HAL_Driver/|
Drivers/BSP/UI/|
Drivers/BSP/NET/lftpd/|
Drivers/BSP/dhara/|
Lib/|
@@ -85,7 +85,6 @@ repos:
(?x)^(
Drivers/CMSIS/|
Drivers/STM32F4xx_HAL_Driver/|
Drivers/BSP/UI/|
Drivers/BSP/NET/lftpd/|
Drivers/BSP/GD5F2GQ5UE/nand_ftl\.|
Drivers/BSP/dhara/|