Inconsistent Naming Conventions for Identifiers

Incomplete Base
Structure: Simple
Description

This weakness occurs when a codebase uses mixed naming styles for elements like variables, functions, data types, or files, creating an inconsistent and confusing structure.

Extended Description

Inconsistent naming—like mixing `camelCase`, `snake_case`, and `PascalCase` for similar elements—directly hurts code clarity and maintainability. When developers can't quickly understand what a function does or what data a variable holds based on its name, it slows down reviews, increases onboarding time, and makes the system harder to navigate and modify safely. This lack of uniformity indirectly creates security risks. It becomes more difficult to spot vulnerable code patterns during audits, and fixes may be incorrectly applied. Furthermore, the confusion makes it easier to introduce new bugs or security flaws during maintenance, as developers might misinterpret the purpose or scope of poorly named components.

References 1
Providing a Framework for Effective Software Quality Assessment
Robert A. Martin and Lawrence H. Shafer
07-1996
ID: REF-963