FaultDetection-ForbiddenOperations¶
When allocated in specific ways, some resource operations are forbidden
Required inputs: IR, StaticSemanticAnalysis
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
forbidden_operation |
The way in which this resource was allocated forbids this operation |
None |
False |
possibly_forbidden_operation |
The way in which this resource was allocated possibly forbids this operation |
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
forbidden¶
forbidden
Dict which lists forbidden operations per resource. The mapping gives each case a description which maps to a dict for key "Forbidden_Functions", "Mode_Parameter", "Mode".Type: dict[str, dict[str, dict[str, str | int]]]
Default:
{ 'FileHandle': { 'Writing to a read-only file stream': { 'Forbidden_Functions': 'fprintf', 'Mode': 'r', 'Mode_Parameter': 1 } } }
resources¶
resources : set[str] = {'FileHandle'}