修复规范矛盾并定案5项规则,保护宏统一XXX_H

规则定案:常量在右(a>5)、保护宏XXX_H(禁双下划线)、
头文件常量用#define、存储类前缀(g_/s_)优先、允许void返回值
全库32个.h头文件保护宏 __XXX_H → XXX_H 改名(字节级替换)
S1检查规则同步更新(拒绝双下划线),Inc/gpio.h 反向验证被正确拦截
规范示例矛盾修复:K&R括号、标准类型、变量初始化、命名常量、注释字段补全
This commit is contained in:
2026-09-01 16:07:00 +08:00
parent 2b66f96d01
commit bb76cfd779
35 changed files with 158 additions and 138 deletions
+3 -3
View File
@@ -25,8 +25,8 @@
* Phase 11 | NET 层 | testTask:KeepAlive 超时断开测试
*/
#ifndef __CH395F_TEST_H
#define __CH395F_TEST_H
#ifndef CH395F_TEST_H
#define CH395F_TEST_H
#ifdef __cplusplus
extern "C" {
@@ -104,4 +104,4 @@ extern test_stats_t g_test_stats;
}
#endif
#endif /* __CH395F_TEST_H */
#endif /* CH395F_TEST_H */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef __CH395F_TEST_TASK_H
#define __CH395F_TEST_TASK_H
#ifndef CH395F_TEST_TASK_H
#define CH395F_TEST_TASK_H
#ifdef __cplusplus
extern "C" {
@@ -12,4 +12,4 @@ void ch395f_test_run(void);
}
#endif
#endif /* __CH395F_TEST_TASK_H */
#endif /* CH395F_TEST_TASK_H */
+3 -3
View File
@@ -22,8 +22,8 @@
* Phase 10 | 边界条件(offset 越界 / size=0 / 未擦除写入 / 写保护解除)
*/
#ifndef __GD5F_TEST_H
#define __GD5F_TEST_H
#ifndef GD5F_TEST_H
#define GD5F_TEST_H
#ifdef __cplusplus
extern "C" {
@@ -86,4 +86,4 @@ void gd5f_test_run(void);
}
#endif
#endif /* __GD5F_TEST_H */
#endif /* GD5F_TEST_H */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef __NET_TEST_TASK_H
#define __NET_TEST_TASK_H
#ifndef NET_TEST_TASK_H
#define NET_TEST_TASK_H
#ifdef __cplusplus
extern "C" {
@@ -19,4 +19,4 @@ void net_layer_client_test_main(void);
}
#endif
#endif /* __NET_TEST_TASK_H */
#endif /* NET_TEST_TASK_H */
+3 -3
View File
@@ -8,8 +8,8 @@
* 创建日期:2026-08-26
*/
#ifndef __STORAGE_TEST_H
#define __STORAGE_TEST_H
#ifndef STORAGE_TEST_H
#define STORAGE_TEST_H
#ifdef __cplusplus
extern "C" {
@@ -54,4 +54,4 @@ void storage_test_run(void);
}
#endif
#endif /* __STORAGE_TEST_H */
#endif /* STORAGE_TEST_H */
+3 -3
View File
@@ -13,8 +13,8 @@
* TEST_SUITE_GD5F : GD5F2GQ5UE NAND 驱动测试
*/
#ifndef __TEST_CONFIG_H
#define __TEST_CONFIG_H
#ifndef TEST_CONFIG_H
#define TEST_CONFIG_H
#ifdef __cplusplus
extern "C" {
@@ -76,4 +76,4 @@ extern "C" {
}
#endif
#endif /* __TEST_CONFIG_H */
#endif /* TEST_CONFIG_H */