Skip to content

Commit 68ad087

Browse files
authored
Merge pull request #53 from rvermeulen/update-rule-package-schema
Update rule package schema to include the standards CERT-C and MISRA C 2012. In addition, we resolve any violations in our rule package descriptions.
2 parents 39f1fa6 + 4f1e46c commit 68ad087

21 files changed

+126
-31
lines changed

c/cert/src/rules/ENV33-C/DoNotCallSystem.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @problem.severity error
88
* @tags external/cert/id/env33-c
99
* security
10-
* external/cert/obligtion/rule
10+
* external/cert/obligation/rule
1111
*/
1212

1313
import cpp

c/cert/src/rules/EXP37-C/CallPOSIXOpenWithCorrectArgumentCount.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EXP37-C: Pass the correct number of arguments to the POSIX open function.
1+
# EXP37-C: Pass the correct number of arguments to the POSIX open function
22

33
This query implements the CERT-C rule EXP37-C:
44

c/cert/src/rules/EXP37-C/CallPOSIXOpenWithCorrectArgumentCount.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @id c/cert/call-posix-open-with-correct-argument-count
3-
* @name EXP37-C: Pass the correct number of arguments to the POSIX open function.
3+
* @name EXP37-C: Pass the correct number of arguments to the POSIX open function
44
* @description A third argument should be passed to the POSIX function open() when and only when
55
* creating a new file.
66
* @kind problem

c/cert/src/rules/EXP37-C/DoNotCallFunctionsWithIncompatibleArguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EXP37-C: Do not pass arguments with an incompatible count or type to a function.
1+
# EXP37-C: Do not pass arguments with an incompatible count or type to a function
22

33
This query implements the CERT-C rule EXP37-C:
44

c/cert/src/rules/EXP37-C/DoNotCallFunctionsWithIncompatibleArguments.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @id c/cert/do-not-call-functions-with-incompatible-arguments
3-
* @name EXP37-C: Do not pass arguments with an incompatible count or type to a function.
3+
* @name EXP37-C: Do not pass arguments with an incompatible count or type to a function
44
* @description The arguments passed to a function must be compatible with the function's
55
* parameters.
66
* @kind problem

c/cert/src/rules/FIO39-C/DoNotAlternatelyIOFromAStreamWithoutPositioning.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/**
22
* @id c/cert/do-not-alternately-io-from-a-stream-without-positioning
33
* @name FIO39-C: Do not alternately input and output from a stream without an intervening flush or positioning call
4-
* @description
4+
* @description Do not alternately input and output from a stream without an intervening flush or
5+
* positioning call. This may result in undefined behavior.
56
* @kind problem
67
* @precision very-high
78
* @problem.severity error

c/cert/src/rules/FIO42-C/CloseFilesWhenTheyAreNoLongerNeeded.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/**
22
* @id c/cert/close-files-when-they-are-no-longer-needed
33
* @name FIO42-C: Close files when they are no longer needed
4-
* @description
4+
* @description Open files must be closed before the lifetime of the last pointer to the file-object
5+
* has ended to prevent resource exhaustion and data loss issues.
56
* @kind problem
67
* @precision very-high
78
* @problem.severity error

c/cert/src/rules/FIO46-C/UndefinedBehaviorAccessingAClosedFile.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @id c/cert/undefined-behavior-accessing-a-closed-file
33
* @name FIO46-C: Do not access a closed file
4-
* @description Do not access a closed file
4+
* @description Do not access a closed file.
55
* @kind problem
66
* @precision high
77
* @problem.severity error

c/misra/src/rules/RULE-13-3/SideEffectAndCrementInFullExpression.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @name RULE-13-3: A full expression containing an increment (++) or decrement (--) operator should have no other
44
* @description A full expression containing an increment (++) or decrement (--) operator should
55
* have no other potential side effects other than that caused by the increment or
6-
* decrement operator
6+
* decrement operator.
77
* @kind problem
88
* @precision very-high
99
* @problem.severity warning

c/misra/src/rules/RULE-22-6/FileUsedAfterClosed.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @id c/misra/file-used-after-closed
33
* @name RULE-22-6: The value of a pointer to a FILE shall not be used after the associated stream has been closed
4-
* @description A closed FILE is accessed
4+
* @description A closed FILE is accessed.
55
* @kind problem
66
* @precision very-high
77
* @problem.severity error

0 commit comments

Comments
 (0)