Miscellaneous-NoStaticInHeader¶
Do not put static declarations into header files
Required inputs: IR
Static declarations should only be used in implementation files for objects/functions that are used locally within that implementation file.
Functions declared in header files should have external linkage, and should be defined in the corresponding implementation file.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
static_function_in_header |
Static declaration in header file. |
None |
False |
static_variable_in_header |
Static declaration in header file. |
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
allow_static_const_in_cpp¶
allow_static_const_in_cpp : bool = True
allow_static_inline¶
allow_static_inline : bool = True