AutosarC++18_03-A0.1.3

Every function defined in an anonymous namespace, or static function with internal linkage, or private member function shall be used

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

declared_function_not_called

Declared function is not called

None

False

defined_function_not_called

Defined function is not called

None

False

Options

ignore_copy_assignment_operators

ignore_copy_assignment_operators : bool = False

Whether uncalled copy assignment operators are allowed.

Other rules like the "rule of three" might require copy assignment operators as part of good class design, even if there are currently no callers of the copy assignment operator.

 

ignore_copy_constructors

ignore_copy_constructors : bool = False

Whether uncalled copy constructors are allowed.

Other rules like the "rule of three" might require copy constructors as part of good class design, even if there are currently no callers of the copy constructor.

 

ignore_move_assignment_operators

ignore_move_assignment_operators : bool = False

Whether uncalled move assignment operators are allowed.

Other rules like the "rule of three" might require move assignment operators as part of good class design, even if there are currently no callers of the move assignment operator.

 

ignore_move_constructors

ignore_move_constructors : bool = False

Whether uncalled move constructors are allowed.

Other rules like the "rule of three" might require move constructors as part of good class design, even if there are currently no callers of the move constructor.

 

only_check_defined_functions

only_check_defined_functions : bool = True

Whether only defined functions should be checked for being uncalled.
 

only_check_internal_or_private_methods

only_check_internal_or_private_methods : bool = True

Whether only function with internal linkage or private functions should be checked for being uncalled. This is a shortcut for a visibility.
 

only_check_static_or_private_methods

only_check_static_or_private_methods : bool = False

Whether only static functions or private functions should be checked for being uncalled. This is a shortcut for a visibility.
 

only_check_unit_locals

only_check_unit_locals : bool = False

Whether only global static functions should be checked for being uncalled.

Note: this option is automatically activated during single-file analysis.

 

suppress_attribute_maybe_unused

suppress_attribute_maybe_unused

Type: FilterAction

Default: 'suppress'

Filter action to apply to violations for objects marked as [[maybe_unused]] or __attribute__((unused)). If set to "suppress", findings will be reported but marked as suppressed. If set to "exclude", findings will not be reported at all. If set to "normal", no special treatment is applied and the finding is reported as usual.
 

visibility

visibility

Type: list[list[Visibility] | Visibility]

Default: []

Describes which functions should be checked for being uncalled as a disjunction of conditions where list elements may be conjunctions given as sublists. If the list is empty no restrictions apply apart those given by the shortcut options only_check_static_or_private_methods or only_check_internal_or_private_methods.
 

Option Types

These types are used by options listed above:

FilterAction

Used for the return value of add_filter() callbacks.
 

normal

The violation proceeds as usual.

exclude

The violation is excluded: The violation is discarded as if `--exclude` applied to it. The following filters won't get to see the violation, and it will not be imported into the database under any circumstances.

suppress

The violation is suppressed as if `AXIVION DISABLE` applied to it. Whether the violation gets imported into the database is controlled by the Axivion CI configuration.

Visibility

An enumeration.
 
  • PRIVATE

  • STATIC

  • NON_VIRTUAL

  • IN_ANONYMOUS_NAMESPACE