修复规范矛盾并定案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
@@ -8,8 +8,8 @@
* 修改记录:
*/
#ifndef __NET_CONFIG_H
#define __NET_CONFIG_H
#ifndef NET_CONFIG_H
#define NET_CONFIG_H
#ifdef __cplusplus
extern "C" {
@@ -101,4 +101,4 @@ extern "C" {
}
#endif
#endif /* __NET_CONFIG_H */
#endif /* NET_CONFIG_H */
+3 -3
View File
@@ -8,8 +8,8 @@
* 修改记录:
*/
#ifndef __NET_SELECT_H
#define __NET_SELECT_H
#ifndef NET_SELECT_H
#define NET_SELECT_H
#ifdef __cplusplus
extern "C" {
@@ -111,4 +111,4 @@ int net_poll_events(net_pollfd_t *fds, int nfds, int timeout);
}
#endif
#endif /* __NET_SELECT_H */
#endif /* NET_SELECT_H */
+3 -3
View File
@@ -8,8 +8,8 @@
* 修改记录:
*/
#ifndef __NET_SOCKET_H
#define __NET_SOCKET_H
#ifndef NET_SOCKET_H
#define NET_SOCKET_H
#ifdef __cplusplus
extern "C" {
@@ -340,4 +340,4 @@ int net_listen_locked(int sockfd);
}
#endif
#endif /* __NET_SOCKET_H */
#endif /* NET_SOCKET_H */
+3 -3
View File
@@ -8,8 +8,8 @@
* 修改记录:
*/
#ifndef __NET_TYPES_H
#define __NET_TYPES_H
#ifndef NET_TYPES_H
#define NET_TYPES_H
#ifdef __cplusplus
extern "C" {
@@ -175,4 +175,4 @@ typedef struct {
}
#endif
#endif /* __NET_TYPES_H */
#endif /* NET_TYPES_H */