Skip to content

Commit 17560cf

Browse files
committed
CPP: Tag the JPL_C LOC-3 queries.
1 parent 9cc39ae commit 17560cf

13 files changed

+30
-6
lines changed

cpp/ql/src/JPL_C/LOC-3/Rule 13/ExternDeclsInHeader.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* @kind problem
55
* @id cpp/jpl-c/extern-decls-in-header
66
* @problem.severity warning
7+
* @tags maintainability
78
*/
89

910
import cpp

cpp/ql/src/JPL_C/LOC-3/Rule 13/LimitedScopeFile.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
* @description Global variables that are not accessed outside their own file should be made static to promote information hiding.
44
* @kind problem
55
* @id cpp/jpl-c/limited-scope-file
6-
* @problem.severity warning
6+
* @problem.severity recommendation
7+
* @precision low
8+
* @tags maintainability
9+
* modularity
710
*/
811

912
import cpp

cpp/ql/src/JPL_C/LOC-3/Rule 13/LimitedScopeFunction.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
* @description Global and file-scope variables that are accessed by only one function should be scoped within that function.
44
* @kind problem
55
* @id cpp/jpl-c/limited-scope-function
6-
* @problem.severity warning
6+
* @problem.severity recommendation
7+
* @precision low
8+
* @tags maintainability
79
*/
810

911
import cpp

cpp/ql/src/JPL_C/LOC-3/Rule 13/LimitedScopeLocalHidesGlobal.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
* @description A local variable or parameter that hides a global variable of the same name.
44
* @kind problem
55
* @id cpp/jpl-c/limited-scope-local-hides-global
6-
* @problem.severity warning
6+
* @problem.severity recommendation
7+
* @tags maintainability
8+
* readability
79
*/
810
import cpp
911

cpp/ql/src/JPL_C/LOC-3/Rule 14/CheckingReturnValues.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* @kind problem
55
* @id cpp/jpl-c/checking-return-values
66
* @problem.severity warning
7+
* @tags correctness
8+
* reliability
79
*/
810

911
import cpp

cpp/ql/src/JPL_C/LOC-3/Rule 15/CheckingParameterValues.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* @kind problem
55
* @id cpp/jpl-c/checking-parameter-values
66
* @problem.severity warning
7+
* @tags correctness
8+
* reliability
79
*/
810

911
import JPL_C.Tasks

cpp/ql/src/JPL_C/LOC-3/Rule 16/UseOfAssertionsConstant.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* @kind problem
55
* @id cpp/jpl-c/use-of-assertions-constant
66
* @problem.severity warning
7+
* @tags maintainability
8+
* reliability
79
*/
810

911
import semmle.code.cpp.commons.Assertions

cpp/ql/src/JPL_C/LOC-3/Rule 16/UseOfAssertionsDensity.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
* @description All functions of more than 10 lines should have at least one assertion.
44
* @kind problem
55
* @id cpp/jpl-c/use-of-assertions-density
6-
* @problem.severity warning
6+
* @problem.severity recommendation
7+
* @tags maintainability
8+
* reliability
79
*/
810

911
import semmle.code.cpp.commons.Assertions

cpp/ql/src/JPL_C/LOC-3/Rule 16/UseOfAssertionsNonBoolean.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* @kind problem
55
* @id cpp/jpl-c/use-of-assertions-non-boolean
66
* @problem.severity warning
7+
* @tags correctness
78
*/
89

910
import semmle.code.cpp.commons.Assertions

cpp/ql/src/JPL_C/LOC-3/Rule 16/UseOfAssertionsSideEffect.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* @kind problem
55
* @id cpp/jpl-c/use-of-assertions-side-effect
66
* @problem.severity warning
7+
* @tags correctness
78
*/
89

910
import semmle.code.cpp.commons.Assertions

0 commit comments

Comments
 (0)