doc: Update enum class constant naming style guide
What changed, and why it matters
This commit only changes a style guide in the project documentation. It removes 'ALL_CAPS' as an acceptable naming style for enum class constants and explains that this avoids clashing with macros. No code, build scripts, or security behavior is changed.
No action needed. This is a documentation-only style-guide update with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A single documentation file (doc/developer-notes.md) is edited. The change narrows the allowed naming conventions for enumerator constants from ‘snake_case, PascalCase or ALL_CAPS’ to ‘snake_case or PascalCase’, citing the C++ Core Guidelines and macro-clash avoidance. There are no source-code, configuration, or cryptographic modifications.
Changed components
doc/developer-notes.mdInspect captured patch +3 / −3
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index 3edf5d34..0bc1bd25 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -40,10 +40,10 @@ code.
- Class member variables have a `m_` prefix.
- Global variables have a `g_` prefix.
- Constant names are all uppercase, and use `_` to separate words.
- - Enumerator constants may be `snake_case`, `PascalCase` or `ALL_CAPS`.
- This is a more tolerant policy than the [C++ Core
+ - Enumerator constants may be `snake_case`, or `PascalCase`. They should not
+ be `ALL_CAPS`, according to the [C++ Core
Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#renum-caps),
- which recommend using `snake_case`. Please use what seems appropriate.
+ to avoid clashing with macros.
- Class names, function names, and method names are UpperCamelCase
(PascalCase). Do not prefix class names with `C`. See [Internal interface
naming style](#internal-interface-naming-style) for an exception to this
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.