CodingStyle-Naming.UserType¶
Template for naming conventions of user-defined types
Required inputs: IR
This rule checks named entities in the source code against a configurable naming convention. Options can restrict the scope of the rule.
To modify the naming convention for a sub-aspect of this rule, please use the copy feature to create another instance and use the rules' options (possibly including filter_predicate) to match the required aspects.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
non_compliant_name |
Names of user-defined types shall use pascal case. |
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
additional_checks¶
additional_checks : list[typing.Tuple[typing.Callable[…, bool], typing.Optional[str]]] = []
- The callback returning
Truefor compliant nodes andFalsefor non-compliant nodes. The callback shall accept parameters:- The first parameter shall be the node to inspect of type
ir.Node - Optionally, the callback
can accept further parameters. These parameters need an explicitly annotated type and that type
shall provide a classmethod
to_work_item(). The value of for the arguments is provided by that workitem's result. The order of parameters is significant and shall be equal for all callbacks. This means that the functions can accept different numbers of parameters, but cannot expect them in different orders.
- The first parameter shall be the node to inspect of type
- the string as a message text.
advanced¶
Options that need not be modified for most use-cases.
advanced.ir_classes : set[str] =
IR classes to be matched for this rule. See IR Reference Guide.{'General_Typedef_Type'}
advanced.part : Part =
Part of the IR classes defined in "ir_classes". See IR Reference Guide.'Logical'
apply_to_renaming_of_classes¶
apply_to_renaming_of_classes : bool = True
apply_to_renaming_of_enums¶
apply_to_renaming_of_enums : bool = True
apply_to_renaming_of_other_types¶
apply_to_renaming_of_other_types : bool = True
apply_... options. This includes basic types, template type parameters and (template)
dependent types. Consider using filter_predicate or additional_checks
to further evaluate the renamed type.
apply_to_renaming_of_structs¶
apply_to_renaming_of_structs : bool = True
apply_to_renaming_of_unions¶
apply_to_renaming_of_unions : bool = True
check_renamings¶
check_renamings : bool = False
exceptions¶
exceptions : set[str] = set()
filter_predicate¶
filter_predicate : typing.Callable[[bauhaus.ir.Node], bool] | None = None
naming_convention¶
naming_convention : typing.Pattern[str] | None = '^[A-Z][A-Za-z0-9]*$'
Option Types¶
These types are used by options listed above:
Part¶
Enum used as type of config options. For all other tCommon
Logical
Physical
Build