Bug 1543024 - [Coverity] Add more information to the exported artifact that is generated by Coverity. r=bastien
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 10 Apr 2019 07:19:26 +0000
changeset 468729 eadc0f907422fc99b40b5ba0e92efec6ed3531ba
parent 468728 3ca06a20dfac8a19479dc2653327d04cf579170c
child 468730 1cd48cfaec567b2c023a58b133aa313c1f0fa920
push id35850
push userdvarga@mozilla.com
push dateWed, 10 Apr 2019 21:52:56 +0000
treeherdermozilla-central@9d3dbe3fef26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbastien
bugs1543024
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1543024 - [Coverity] Add more information to the exported artifact that is generated by Coverity. r=bastien Differential Revision: https://phabricator.services.mozilla.com/D26682
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1873,25 +1873,29 @@ class StaticAnalysis(MachCommandBase):
             def build_element(issue):
                 # We look only for main event
                 event_path = next((event for event in issue['events'] if event['main'] is True), None)
 
                 dict_issue = {
                     'line': issue['mainEventLineNumber'],
                     'flag': issue['checkerName'],
                     'message': event_path['eventDescription'],
-                    'extra': []
+                    'extra': {
+                        'category': issue['checkerProperties']['category'],
+                        'stateOnServer': issue['stateOnServer'],
+                        'stack': []
+                    }
                 }
 
                 # Embed all events into extra message
                 for event in issue['events']:
-                    dict_issue['extra'].append({'file_path': event['strippedFilePathname'],
-                                                'line_number': event['lineNumber'],
-                                                'path_type': event['eventTag'],
-                                                'description': event['eventDescription']})
+                    dict_issue['extra']['stack'].append({'file_path': event['strippedFilePathname'],
+                                                         'line_number': event['lineNumber'],
+                                                         'path_type': event['eventTag'],
+                                                         'description': event['eventDescription']})
 
                 return dict_issue
 
             for issue in result['issues']:
                 path = issue['strippedMainEventFilePathname'].strip('/')
                 if path in files_list:
                     files_list[path]['warnings'].append(build_element(issue))
                 else: