Add naming rules #233
Copy link
Copy link
Open
Labels
Description
As already mention in #132, General Naming Rules and Variable Names from Google C++ Style Guide are not checked.
Is there a way to activate them? And if not, are there any plans to implent them in cpplint?
In my opinion, naming rules are one of the most important rules, to ensure readability and consistency across a code base. Hence, this would be a crucial feature for cpplint.
Reactions are currently unavailable
Activity
[-]How to activate `General Naming Rules` and `Variable Names` from Google C++ Style Guide?[/-][+]Add naming rules[/+]ravenCrown0627 commentedon Jul 23, 2026
Hi @aaronliu0130 , I’d like to work toward adding the mechanically checkable naming conventions currently missing from
cpplint, as discussed in this PR.I propose doing this as a series of small, independently reviewable PRs rather than one large naming-rule change. Candidate follow-ups would cover type and concept names, variables and parameters, class and struct members, constants and enumerators, functions, template parameters, and macros. Each PR would be limited to identifiers cpplint can classify reliably, rather than attempting subjective checks such as whether a name is sufficiently descriptive.
For the first PR, I propose revisiting and crediting the work in #286. I would follow the feedback provided in the previous PR:
Besides, I would like to propose enabling this first rule by default, while retaining the existing --filter, CPPLINT.cfg, and NOLINT suppression mechanisms. Custom naming patterns would be deferred until the underlying naming categories and identifier detection are established.
Would this broader series and the proposed first PR be an acceptable direction before I begin implementation?
aaronliu0130 commentedon Jul 23, 2026
Sure, but I expect to release 2.1 without it merged. (Also, FYI prefer handwritten short messages instead of the very detailed stuff that often feels generated. :)
ravenCrown0627 commentedon Jul 24, 2026
Good to know this, will bear in mind when develop the feature. Thanks