The C code in native/ uses PascalCase for struct fields (e.g., StickySession, JVMRoute, Host, Port), function parameters (Alias, Load), and local variables. This is unconventional for C where snake_case is the standard naming convention.
Affected identifiers (17 struct fields, 3 parameters/variables)
balancerinfo: StickySession, StickySessionCookie, StickySessionPath, StickySessionRemove, StickySessionForce, Timeout, Maxattempts
nodemess: JVMRoute, Domain, Host, Port, Type, Upgrade, AJPSecret, ResponseFieldSize
domaininfo, sessionidinfo: JVMRoute
- Function parameters/locals in
mod_manager.c: Alias, Load
Proposed changes
- Rename all PascalCase struct fields, parameters, and local variables to snake_case across all
.c and .h files under native/
- Preserve all MCMP wire protocol string literals (
"JVMRoute", "StickySession", etc. in strcasecmp() calls and XML output tags) to maintain backward compatibility
- Add a
clang-tidy configuration (native/.clang-tidy) with readability-identifier-naming check to enforce lower_case for struct members, function parameters, and local variables
- Add a
clang-tidy-naming-check CI job to prevent future regressions
Important: This is a purely internal rename. The MCMP protocol contract (string constants and XML tags) remains unchanged — no client-side changes required.
The C code in
native/uses PascalCase for struct fields (e.g.,StickySession,JVMRoute,Host,Port), function parameters (Alias,Load), and local variables. This is unconventional for C where snake_case is the standard naming convention.Affected identifiers (17 struct fields, 3 parameters/variables)
balancerinfo:StickySession,StickySessionCookie,StickySessionPath,StickySessionRemove,StickySessionForce,Timeout,Maxattemptsnodemess:JVMRoute,Domain,Host,Port,Type,Upgrade,AJPSecret,ResponseFieldSizedomaininfo,sessionidinfo:JVMRoutemod_manager.c:Alias,LoadProposed changes
.cand.hfiles undernative/"JVMRoute","StickySession", etc. instrcasecmp()calls and XML output tags) to maintain backward compatibilityclang-tidyconfiguration (native/.clang-tidy) withreadability-identifier-namingcheck to enforcelower_casefor struct members, function parameters, and local variablesclang-tidy-naming-checkCI job to prevent future regressionsImportant: This is a purely internal rename. The MCMP protocol contract (string constants and XML tags) remains unchanged — no client-side changes required.