Skip to content

Commit

Permalink
ci(misra rules): 🦺 Add rules for resources
Browse files Browse the repository at this point in the history
This concludes the addition of missing rules.
  • Loading branch information
ZZ-Cat committed Sep 8, 2024
1 parent 68c880a commit 14c03d4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/cppcheck/misra-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,15 @@ Rule 21.11 Required
The standard header file <tgmath.h> shall not be used.
Rule 21.12 Advisory
The exception handling features of <fenv.h> shall not be used.
Rule 22.1 Required
All resources obtained dynamically by means of Standard Library functions shall be explicitly released.
Rule 22.2 Mandatory
A block of memory shall only be freed if it was allocated by means of a Standard Library function.
Rule 22.3 Required
The same file shall not be open for read and write access at the same time on different streams.
Rule 22.4 Mandatory
There shall be no attempt to write to a stream that has been opened as read-only.
Rule 22.5 Mandatory
A pointer to a FILE object shall not be dereferenced.
Rule 22.6 Mandatory
The value of a pointer to a FILE object shall not be used after the associated stream has been closed.

0 comments on commit 14c03d4

Please sign in to comment.