AutosarC++17_03-A2.11.4

The identifier name of a non-member object with static storage duration or static function shall not be reused within a namespace

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

reused_global_function_name

Name of object or function with static storage duration reused.

None

False

reused_global_variable_name

Name of object or function with static storage duration reused.

None

False

Options

allow_overloads

allow_overloads : bool = True

If set to true, overloads are not reported as violations.
 

allow_reusing_function_name_for_locals

allow_reusing_function_name_for_locals : bool = False

Whether the reuse of a function name (with static storage duration) as the name of local variables should be allowed.
 

allow_static_no_linkage

allow_static_no_linkage : bool = False

Whether to allow same identifiers for static objects without linkage (e.g. function local static objects).
 

detect_different_compilation_units_overloads

detect_different_compilation_units_overloads : bool = False

If set to true, functions with the same name and in the same scope are detected as overloads even if they are not part of the same compilation unit.
 

func_filter

func_filter : typing.Callable[[bauhaus.ir.Node], bool] | None = None

Restricts which functions are considered.
 

include_local_variables

include_local_variables : bool = True

Whether local static variables should be included in the check.
 

use_unqualified_names

use_unqualified_names : bool = False

If set to True, ns1::Type is considered equal to ns2::Type.
 

var_filter

var_filter : typing.Callable[[Variable], bool] | None = None

Restricts which variables are considered.