AutosarC++19_03-A16.2.2¶
There shall be no unused include directives
Required inputs: IR
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
unused_include |
#include {inc} can be removed as file does not use anything from it |
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
accept_incomplete_arguments¶
accept_incomplete_arguments
Names of templates for which incomplete types should be accepted as allowed template type arguments (so forward declarations of these arguments are enough to instantiate the template).Type: list[bauhaus.analysis.config.ShortTypeName]
Default:
['shared_ptr', 'unique_ptr', 'weak_ptr', 'auto_ptr', 'default_delete', 'enable_shared_from_this', 'list', 'forward_list', 'vector', 'allocator', 'polymorphic_allocator', 'is_void', 'is_null_pointer', 'is_integral', 'is_floating_point', 'is_array', 'is_pointer', 'is_lvalue_reference', 'is_rvalue_reference', 'is_member_object_pointer', 'is_member_function_pointer', 'is_enum', 'is_union', 'is_class', 'is_function', 'is_reference', 'is_arithmetic', 'is_fundamental', 'is_object', 'is_scalar', 'is_compound', 'is_member_pointer', 'is_const', 'is_volatile', 'is_signed', 'is_unsigned', 'rank', 'extent', 'is_same', 'remove_const', 'remove_volatile', 'remove_cv', 'add_const', 'add_volatile', 'add_cv', 'remove_reference', 'add_lvalue_reference', 'add_rvalue_reference', 'make_signed', 'make_unsigned', 'remove_extent', 'remove_all_extents', 'remove_pointer', 'add_pointer', 'decay', 'enable_if', 'conditional']
avoid_uncertain_messages¶
avoid_uncertain_messages : bool = True
context_macros¶
context_macros : list[str] = []
enums_can_be_redeclared¶
enums_can_be_redeclared : bool = False
#includes.
interface_headers¶
interface_headers : list[bauhaus.analysis.config.FileGlobPattern] = []
#include files without using them. #includes to these
interface files are also treated as ok.
limit_for_moving¶
limit_for_moving : int = 3
limit_for_replacing¶
limit_for_replacing : int = 3
routines_can_be_redeclared¶
routines_can_be_redeclared : bool = False
#includes.
typedefs_can_be_redeclared¶
typedefs_can_be_redeclared : bool = False
#includes.