File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,24 @@ def generate_short_name(title):
110
110
print ("Error: " + standard + " " + rule_id + " is marked as part of package " + package_name + " but is not marked as supportable." )
111
111
sys .exit (1 )
112
112
113
+ tags = []
114
+
113
115
# Add the AUTOSAR obligation, enforcement and allocated target as query properties.
114
116
properties = {}
115
117
if obligation_level :
116
118
properties ["obligation" ] = obligation_level .lower ()
117
119
if enforcement_level :
118
120
properties ["enforcement" ] = enforcement_level .lower ()
119
121
if allocated_targets :
120
- properties ["allocated-target" ] = [target .strip (' ' ).lower () for target in allocated_targets .split ("/" )]
122
+ if allocated_targets == "Single Translation Unit" :
123
+ # MISRA C++ 2023 uses the allocated targets field for scope
124
+ tags .append ("scope/single-translation-unit" )
125
+ elif allocated_targets == "System" :
126
+ # MISRA C++ 2023 uses the allocated targets field for scope
127
+ tags .append ("scope/system" )
128
+ else :
129
+ properties ["allocated-target" ] = [target .strip (' ' ).lower () for target in allocated_targets .split ("/" )]
130
+
121
131
if difficulty == "Audit" :
122
132
properties ["audit" ] = ""
123
133
@@ -164,7 +174,7 @@ def generate_short_name(title):
164
174
"severity" : severity ,
165
175
"description" : description ,
166
176
"kind" : "problem" ,
167
- "tags" : []
177
+ "tags" : tags
168
178
}
169
179
]
170
180
}
Original file line number Diff line number Diff line change 58
58
"MISRA-C-2012" : {
59
59
"standard_title" : "MISRA-C:2012 Guidelines for the use of the C language in critical systems" ,
60
60
"standard_url" : "https://www.misra.org.uk/"
61
+ },
62
+ "MISRA-C++-2023" : {
63
+ "standard_title" : "MISRA C++:2023 Guidelines for the use C++:17 in critical systems" ,
64
+ "standard_url" : "https://misra.org.uk/product/misra-cpp2023/"
61
65
}
62
66
}
63
67
64
68
# The help files of these standards cannot be distributed in our repository.
65
- external_help_file_standards = ["AUTOSAR" , "MISRA-C-2012" ]
69
+ external_help_file_standards = ["AUTOSAR" , "MISRA-C-2012" , "MISRA-C++-2023" ]
66
70
67
71
# Mapping from the QL language to source file extension used to generate a help example file.
68
72
ql_language_ext_mappings = {
You can’t perform that action at this time.
0 commit comments