@@ -99,6 +99,22 @@ export class NotificationHandler {
99
99
} ;
100
100
} ;
101
101
102
+ const makeReason = ( ) : ( Command ) [ ] => {
103
+ if ( ! status . reason ) {
104
+ return [ ] ;
105
+ }
106
+
107
+ return [ {
108
+ title : `Reason: ${ status . reason } ` ,
109
+ command : 'codechecker.executor.showOutput' ,
110
+ tooltip : `Reason: ${ status . reason } \nSee the output log for full details`
111
+ } ,
112
+ {
113
+ title : 'Show process logs' ,
114
+ command : 'codechecker.executor.showOutput'
115
+ } ] ;
116
+ } ;
117
+
102
118
switch ( status . type ) {
103
119
case ProcessStatusType . queued : {
104
120
const newNotification = SidebarContainer . notificationView . addNotification (
@@ -148,7 +164,16 @@ export class NotificationHandler {
148
164
case ProcessStatusType . finished : {
149
165
notification ! . update ( {
150
166
message : makeMessage ( 'finished running' ) ,
151
- choices : [ ]
167
+ choices : makeReason ( )
168
+ } ) ;
169
+ this . activeNotifications . delete ( process . commandLine ) ;
170
+
171
+ break ;
172
+ }
173
+ case ProcessStatusType . warning : {
174
+ notification ! . update ( {
175
+ message : makeMessage ( 'finished with warnings' ) ,
176
+ choices : makeReason ( )
152
177
} ) ;
153
178
this . activeNotifications . delete ( process . commandLine ) ;
154
179
@@ -157,10 +182,7 @@ export class NotificationHandler {
157
182
case ProcessStatusType . errored : {
158
183
notification ! . update ( {
159
184
message : makeMessage ( 'finished with errors' ) ,
160
- choices : [ {
161
- title : 'Show process logs' ,
162
- command : 'codechecker.executor.showOutput'
163
- } ]
185
+ choices : makeReason ( )
164
186
} ) ;
165
187
this . activeNotifications . delete ( process . commandLine ) ;
166
188
0 commit comments