FaultDetection-FileModeConflict¶
The same file shall not be open for read and write access at the same time on different streams
Required inputs: IR, StaticSemanticAnalysis
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
mode_conflict |
Same file used for both reading and writing |
None |
False |
possible_mode_conflict |
Same file possibly used for both reading and writing |
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
modes¶
modes
Describes when an allocating call opens a file in read or write mode. This is a dict resource -> dict with keys "Resource_Parameter", "Check_Write_Write", and "Modes" (being a dict with key "Read" and "Write").Type: dict[str, dict[str, str | bool | dict[str, str]]]
Default:
{ 'FileHandle': { 'Check_Write_Write': False, 'Mode_Parameter': '1', 'Modes': { 'Read': 'r,rb', 'Write': 'r+,w,a,wb,ab,w+,a+,r+b,w+b,a+b,rb+,wb+,ab+' }, 'Resource_Parameter': '0' } }
resources¶
resources : set[str] = {'FileHandle'}