Skip to content

Commit 97f6657

Browse files
committed
refactor RULE-4-12 -> DIR-4-12
1 parent 4ad5ce0 commit 97f6657

File tree

8 files changed

+6
-5
lines changed

8 files changed

+6
-5
lines changed

.vscode/tasks.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
"type": "pickString",
186186
"options": [
187187
"Allocations",
188+
"Banned",
188189
"BannedFunctions",
189190
"BannedLibraries",
190191
"BannedSyntax",

c/misra/src/rules/RULE-4-12/StdLibDynamicMemoryAllocationUsed.ql renamed to c/misra/src/rules/DIR-4-12/StdLibDynamicMemoryAllocationUsed.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
22
* @id c/misra/std-lib-dynamic-memory-allocation-used
3-
* @name RULE-4-12: Dynamic memory allocation shall not be used
3+
* @name DIR-4-12: Dynamic memory allocation shall not be used
44
* @description Using dynamic memory allocation and deallocation can result to undefined behavior.
55
* This query is for the Standard Library Implementation. Any implementation outside it
66
* will require a separate query under the same directive.
77
* @kind problem
88
* @precision very-high
99
* @problem.severity error
10-
* @tags external/misra/id/rule-4-12
10+
* @tags external/misra/id/dir-4-12
1111
* security
1212
* correctness
1313
* maintainability
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rules/DIR-4-12/StdLibDynamicMemoryAllocationUsed.ql

c/misra/test/rules/RULE-4-12/StdLibDynamicMemoryAllocationUsed.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

cpp/common/src/codingstandards/cpp/exclusions/c/Banned.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ predicate isBannedQueryMetadata(Query query, string queryId, string ruleId) {
159159
queryId =
160160
// `@id` for the `stdLibDynamicMemoryAllocationUsed` query
161161
"c/misra/std-lib-dynamic-memory-allocation-used" and
162-
ruleId = "RULE-4-12"
162+
ruleId = "DIR-4-12"
163163
or
164164
query =
165165
// `Query` instance for the `octalConstantsUsed` query

rule_packages/c/Banned.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
],
305305
"title": "The Standard Library functions 'bsearch' and 'qsort' of 'stdlib.h' shall not be used"
306306
},
307-
"RULE-4-12": {
307+
"DIR-4-12": {
308308
"properties": {
309309
"obligation": "required"
310310
},

0 commit comments

Comments
 (0)