You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -269,7 +270,7 @@ The CodeQL Coding Standards supports the following features from the [MISRA Comp
269
270
270
271
-_Deviation records_ - an entry that states a particular instance, or set of instances, of a rule should be considered permitted.
271
272
-_Deviation permit_ - an entry that provides authorization to apply a deviation to a project.
272
-
-_Guideline recategorization plan_ - an agreement on how the guidelines are applied. Whether a guideline may be violated, deviated from, or must always be applied.
273
+
-_Guideline re-categorization plan_ - an agreement on how the guidelines are applied. Whether a guideline may be violated, deviated from, or must always be applied.
273
274
274
275
##### Deviation records
275
276
@@ -397,16 +398,28 @@ Unlike _deviation records_ their location in the source directory does not impac
397
398
This means that _deviation permits_ can be made available at build time by any means available.
398
399
An example of importing _deviation permits_ is through a [Git Submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) that contains a repository of allowed _deviation permits_.
399
400
400
-
##### Guideline recategorization plan
401
+
##### Guideline re-categorization plan
401
402
402
-
The current implementation supports a _guideline recategorization plan_ as described in the [MISRA Compliance:2020](https://www.misra.org.uk/app/uploads/2021/06/MISRA-Compliance-2020.pdf) section _5 The guideline re-categorization plan_.
403
+
The current implementation supports a _guideline re-categorization plan_ as described in the [MISRA Compliance:2020](https://www.misra.org.uk/app/uploads/2021/06/MISRA-Compliance-2020.pdf) section _5 The guideline re-categorization plan_.
403
404
404
-
A recategorization plan provides a mechanism to adjust the policy associated with a guideline that determines whether it may be violated or not and if it may be violated whether a deviation is required.
405
-
Each guideline recategorization **must** be specified in the `guideline-recategorizations` section of a `coding-standards.yml` file that **must** be anywhere in the source repository.
405
+
A re-categorization plan provides a mechanism to adjust the policy associated with a guideline that determines whether it may be violated or not and if it may be violated whether a deviation is required.
406
406
407
-
A guideline recategorization specification **must** specify a `rule-id`, an identifier for the coding standards rule the recategorization applies to, and a `category`, a category that can be any of `disapplied`, `advisory`, `required`, or `mandatory`.
407
+
The implementation follows the constraints on re-categorization as described in [MISRA Compliance:2020](https://www.misra.org.uk/app/uploads/2021/06/MISRA-Compliance-2020.pdf) section _5.1 Re-categorization_.
408
408
409
-
An example guideline recategorization section is:
409
+
The following tables described the re-categorizations are permitted.
Each guideline re-categorization **must** be specified in the `guideline-recategorizations` section of a `coding-standards.yml` file that **must** be anywhere in the source repository.
419
+
420
+
A guideline re-categorization specification **must** specify a `rule-id`, an identifier for the coding standards rule the re-categorization applies to, and a `category`, a category that can be any of `disapplied`, `advisory`, `required`, or `mandatory`.
421
+
422
+
An example guideline re-categorization section is:
410
423
411
424
```yaml
412
425
guideline-recategorizations:
@@ -418,7 +431,7 @@ guideline-recategorizations:
418
431
category: "mandatory"
419
432
```
420
433
421
-
Application of the guideline recategorization plan to the analysis results requires an additional post-processing step.
434
+
Application of the guideline re-categorization plan to the analysis results requires an additional post-processing step.
422
435
The post-processing step is implemented by the Python script `path/to/codeql-coding-standards/scripts/guideline_recategorization/recategorize.py`.
423
436
The script will update the `external/<standard>/obligation/<category>` tag for each query implementing a recategorized guideline such that `<category>` is equal to the new category and
424
437
add the tag `external/<standard>/original-obligation/<category` to each query implementing a recategorized guideline such that `<category>` reflects the orignal category.
0 commit comments