SecureCoding-5.44

Using identifiers that are reserved for the implementation

Required inputs: IR

Rule description is currently unavailable for legal reasons.

Possible Messages

Key

Text

Severity

Disabled

enumerator_having_libname

The names of standard library macros, objects and functions, as well as reserved identifiers, shall not be reused.

None

False

field_having_libname

The names of standard library macros, objects and functions shall not be reused.

None

False

macro_having_reserved_name

Definition of reserved identifier or standard library element

None

False

routine_having_libname

The names of standard library macros, objects and functions, as well as reserved identifiers, shall not be reused.

None

False

type_having_libname

The names of standard library macros, objects and functions shall not be reused.

None

False

undef_of_reserved_name

#undef of reserved identifier or standard library element

None

False

variable_having_libname

The names of standard library macros, objects and functions, as well as reserved identifiers, shall not be reused.

None

False

Options

additional_reserved_identifiers

additional_reserved_identifiers : set[str] = {'assert', 'defined', 'errno'}

Names listed here are seen as violations as well.
 

allow_function_declarations

allow_function_declarations : bool = False

Whether nondefining function declarations with library names are allowed.
 

allow_identifiers

allow_identifiers : set[bauhaus.analysis.config.GlobPattern] = {'_CRT_*_NO_WARNINGS'}

Name patterns listed here are not seen as violations.
 

allow_reserved_identifier_as_include_guard

allow_reserved_identifier_as_include_guard : bool = False

If true, macros used for include guards are not checked for being a reserved identifier.
 

check_for_keyword

check_for_keyword : bool = True

Whether macro names being keywords should be reported as well.
 

check_locals

check_locals : bool = True

Whether parameters and local variables should also be checked.
 

check_reserved_enum_identifier

check_reserved_enum_identifier : bool = False

Whether enumerator names should be checked to use a reserved identifier.
 

check_reserved_function_identifier

check_reserved_function_identifier : bool = False

Whether function names should be checked to use a reserved identifier.
 

check_reserved_type_identifier

check_reserved_type_identifier : bool = False

Whether type names should be checked to use a reserved identifier.
 

check_reserved_variable_identifier

check_reserved_variable_identifier : bool = True

Whether variable names should be checked to use a reserved identifier.