Skip to content

Commit ee795e6

Browse files
authored
Merge pull request #124 from jsinglet/jsinglet/rule-fix-dir-1-2
Fix Duplicate and Incorrect Rule IDs
2 parents 00a369f + 78b5f37 commit ee795e6

32 files changed

+147
-34
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ⚙️ Validate Rules CSV
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- "rc/**"
8+
- next
9+
pull_request:
10+
branches:
11+
- main
12+
- "rc/**"
13+
- next
14+
15+
16+
jobs:
17+
validate-rules-csv:
18+
name: Validate Rules CSV
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Check Rules
25+
shell: pwsh
26+
run: scripts/util/Get-DuplicateRules.ps1 -Language 'all' -CIMode
27+
28+

.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-10/PrecautionIncludeGuardsNotProvided.ql renamed to c/misra/src/rules/DIR-4-10/PrecautionIncludeGuardsNotProvided.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* @id c/misra/precaution-include-guards-not-provided
3-
* @name RULE-4-10: Precautions shall be taken in order to prevent the contents of a header file being included more than once
3+
* @name DIR-4-10: Precautions shall be taken in order to prevent the contents of a header file being included more than once
44
* @description Using anything other than a standard include guard form can make code confusing and
55
* can lead to multiple or conflicting definitions.
66
* @kind problem
77
* @precision very-high
88
* @problem.severity warning
9-
* @tags external/misra/id/rule-4-10
9+
* @tags external/misra/id/dir-4-10
1010
* correctness
1111
* maintainability
1212
* readability

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
22
* @id c/misra/sections-of-code-shall-not-be-commented-out
3-
* @name RULE-4-4: Sections of code should not be commented out
3+
* @name DIR-4-4: Sections of code should not be commented out
44
* @description Commented out code may become out of date leading to developer confusion.
55
* @kind problem
66
* @precision high
77
* @problem.severity warning
8-
* @tags external/misra/id/rule-4-4
8+
* @tags external/misra/id/dir-4-4
99
* maintainability
1010
* readability
1111
* correctness

c/misra/src/rules/RULE-4-8/ObjectWithNoPointerDereferenceShouldBeOpaque.ql renamed to c/misra/src/rules/DIR-4-8/ObjectWithNoPointerDereferenceShouldBeOpaque.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
22
* @id c/misra/object-with-no-pointer-dereference-should-be-opaque
3-
* @name RULE-4-8: The implementation of an object shall be hidden if a pointer to its structure or union is never dereferenced within a translation unit
3+
* @name DIR-4-8: The implementation of an object shall be hidden if a pointer to its structure or union is never dereferenced within a translation unit
44
* @description If a pointer to a structure or union is never dereferenced within a translation
55
* unit, then the implementation of the object should be hidden to prevent
66
* unintentional changes.
77
* @kind problem
88
* @precision very-high
99
* @problem.severity error
10-
* @tags external/misra/id/rule-4-8
10+
* @tags external/misra/id/dir-4-8
1111
* readability
1212
* maintainability
1313
* external/misra/obligation/advisory
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rules/DIR-4-12/StdLibDynamicMemoryAllocationUsed.ql

0 commit comments

Comments
 (0)