AI: Fix naming problem in kernel module. v7.0.82 (#4479)

Co-authored-by: OSSRS-AI <winlinam@gmail.com>
This commit is contained in:
Winlin
2025-09-07 21:09:08 -04:00
committed by GitHub
parent 7c1e87ef5c
commit 8f87d4092b
77 changed files with 6027 additions and 5737 deletions

View File

@@ -164,7 +164,7 @@ code_patterns:
naming_conventions:
- pattern: "field_naming"
description: "MANDATORY - All class and struct fields must end with underscore (_)"
description: "MANDATORY - All class and struct fields (member variables) must end with underscore (_), but NOT functions/methods"
usage: |
WRONG: Fields without underscore
class SrsBuffer {
@@ -175,17 +175,19 @@ code_patterns:
bool enabled;
};
CORRECT: Fields with underscore
CORRECT: Fields with underscore, functions without underscore
class SrsBuffer {
private:
char *p_;
int size_;
public:
bool enabled_;
public:
srs_error_t initialize();
};
scope: "Applies to ALL fields (private, protected, public) in both classes and structs"
scope: "Applies ONLY to fields (member variables) in classes and structs - NOT to functions, methods, or parameters"
exceptions: "Only applies to SRS-defined classes/structs - do NOT change 3rd party code like llhttp"
rationale: "Consistent naming convention across SRS codebase for better code readability and maintenance"
rationale: "Consistent naming convention across SRS codebase for better code readability and maintenance - underscore distinguishes member variables from local variables and parameters"
commenting_style:
- pattern: "C++ style comments"