AutosarC++18_10-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¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
ignore_copy_assignment_operators¶
ignore_copy_assignment_operators : bool = False
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
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
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
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
only_check_internal_or_private_methods¶
only_check_internal_or_private_methods : bool = True
only_check_static_or_private_methods¶
only_check_static_or_private_methods : bool = False
only_check_unit_locals¶
only_check_unit_locals : bool = False
Note: this option is automatically activated during single-file analysis.
suppress_attribute_maybe_unused¶
suppress_attribute_maybe_unused
Filter action to apply to violations for objects marked asType: FilterAction
Default:
'suppress'
[[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
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.Type: list[list[Visibility] | Visibility]
Default:
[]
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