@@ -3440,7 +3440,7 @@ export class ProjectExplorer implements CustomConfigurationProvider {
34403440 context . subscriptions . push ( vscode . commands . registerCommand ( ProjTreeItem . ITEM_CLICK_EVENT , ( item ) => this . OnTreeItemClick ( item ) ) ) ;
34413441
34423442 // create vsc output channel
3443- this . cppcheck_out = vscode . window . createOutputChannel ( 'eide-cppcheck ' ) ;
3443+ this . cppcheck_out = vscode . window . createOutputChannel ( 'eide-static-check-log ' ) ;
34443444 this . cppToolsOut = vscode . window . createOutputChannel ( 'eide-cpptools-log' ) ;
34453445
34463446 // register doc event
@@ -5754,8 +5754,11 @@ export class ProjectExplorer implements CustomConfigurationProvider {
57545754 const diags = Array . from ( this . cppcheck_diag . get ( uri ) || [ ] ) ;
57555755 const line = parseInt ( mRes [ pattern . line ] ) ;
57565756 const col = parseInt ( mRes [ pattern . column ] ) ;
5757- const pos = new vscode . Position ( line - 1 , col - 1 ) ;
5758- const diag = new vscode . Diagnostic ( new vscode . Range ( pos , pos ) , mRes [ pattern . message ] , toVscServerity ( mRes [ pattern . severity ] ) ) ;
5757+ const col_s = col > 0 ? ( col - 1 ) : 0 ;
5758+ const range = new vscode . Range (
5759+ new vscode . Position ( line - 1 , col_s ) ,
5760+ new vscode . Position ( line - 1 , col_s + 10 ) ) ;
5761+ const diag = new vscode . Diagnostic ( range , mRes [ pattern . message ] , toVscServerity ( mRes [ pattern . severity ] ) ) ;
57595762 diag . source = 'cppcheck' ;
57605763 diags . push ( diag ) ;
57615764 this . cppcheck_diag . set ( uri , diags ) ;
@@ -5780,6 +5783,7 @@ export class ProjectExplorer implements CustomConfigurationProvider {
57805783 GlobalEvent . emit ( 'msg' , ExceptionToMessage ( err ) ) ;
57815784 } ) ;
57825785
5786+ this . cppcheck_out . append ( `>>> Exec cppcheck\n -> ${ exeFile . name } ${ cmds . join ( ' ' ) } \n\n` ) ;
57835787 process . Run ( exeFile . name , cmds , opts ) ;
57845788 } ) ;
57855789 } ) ;
0 commit comments