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):
110110 print ("Error: " + standard + " " + rule_id + " is marked as part of package " + package_name + " but is not marked as supportable." )
111111 sys .exit (1 )
112112
113+ tags = []
114+
113115 # Add the AUTOSAR obligation, enforcement and allocated target as query properties.
114116 properties = {}
115117 if obligation_level :
116118 properties ["obligation" ] = obligation_level .lower ()
117119 if enforcement_level :
118120 properties ["enforcement" ] = enforcement_level .lower ()
119121 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+
121131 if difficulty == "Audit" :
122132 properties ["audit" ] = ""
123133
@@ -164,7 +174,7 @@ def generate_short_name(title):
164174 "severity" : severity ,
165175 "description" : description ,
166176 "kind" : "problem" ,
167- "tags" : []
177+ "tags" : tags
168178 }
169179 ]
170180 }
Original file line number Diff line number Diff line change 5858 "MISRA-C-2012" : {
5959 "standard_title" : "MISRA-C:2012 Guidelines for the use of the C language in critical systems" ,
6060 "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/"
6165 }
6266}
6367
6468# 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" ]
6670
6771# Mapping from the QL language to source file extension used to generate a help example file.
6872ql_language_ext_mappings = {
You can’t perform that action at this time.
0 commit comments