Function name is not snake_case

ID

c.maintainability.naming_method

Severity

info

Remediation Complexity

trivial

Remediation Risk

low

Remediation Effort

low

Resource

Naming

Language

C / C++

Description

Function $FN is not named in snake_case. By convention, C functions use lowercase names with underscores (e.g. get_value) for a consistent, readable API surface. Rename the function to match ^[a-z][a-z0-9_]*$ (adjust to your project’s chosen style if it differs).

Rationale

Function $FN is not named in snake_case. By convention, C functions use lowercase names with underscores (e.g. get_value) for a consistent, readable API surface. Rename the function to match ^[a-z][a-z0-9_]*$ (adjust to your project’s chosen style if it differs).

The following code illustrates the pattern detected by this rule:

// FLAGGED: Function name is not snake_case
int GetValue(void) { return 1; }

Remediation

Follow secure coding practices and review the references below for detailed remediation guidance.

Configuration

This detector does not need any configuration.