@@ -102,14 +102,14 @@ export default class CheckpatchProvider implements vscode.CodeActionProvider {
102102
103103 private parseCheckpatchLog ( log : string , basePath : string ) : number {
104104 const dictionary : { [ fileUri : string ] : vscode . Diagnostic [ ] } = { } ;
105- var re = / ( W A R N I N G | E R R O R | C H E C K ) : ? ( . + ) : ( . + ) ? (?: \n | \r \n | ) # \d + : F I L E : ( . * ) : ( \d + ) : / g;
105+ var re = / ( . * ) : ( \d + ) : ( W A R N I N G | E R R O R | C H E C K ) : ? ( . + ) : ( . + ) / g;
106106 var matches ;
107107
108108 while ( matches = re . exec ( log ) ) {
109- let type = matches [ 2 ] ;
110- let message = matches [ 3 ] ;
111- let fileName = matches [ 4 ] ;
112- let errorline = parseInt ( matches [ 5 ] ) ;
109+ let fileName = matches [ 1 ] ;
110+ let errorline = parseInt ( matches [ 2 ] ) ;
111+ let type = matches [ 4 ] ;
112+ let message = matches [ 5 ] ;
113113 let range = new vscode . Range ( errorline - 1 , 0 , errorline - 1 , Number . MAX_VALUE ) ;
114114 let diagnostic = new vscode . Diagnostic ( range , `${ type } :${ message } ` , this . linterConfig . diagnosticSeverity ) ;
115115
@@ -143,7 +143,9 @@ export default class CheckpatchProvider implements vscode.CodeActionProvider {
143143 let log = '' ;
144144 let args = this . linterConfig . args . slice ( ) ;
145145 let cwd = vscode . workspace . workspaceFolders ? vscode . workspace . workspaceFolders [ 0 ] . uri . fsPath : undefined ;
146- args . push ( '--show-types -f' ) ;
146+ args . push ( '--show-types' ) ;
147+ args . push ( '--showfile' ) ;
148+ args . push ( '-f' ) ;
147149 args . push ( textDocument . fileName . replace ( / \\ / g, '/' ) ) ;
148150
149151 let childProcess = cp . spawn ( this . linterConfig . path , args , { shell : true , cwd : cwd } ) ;
@@ -195,6 +197,7 @@ export default class CheckpatchProvider implements vscode.CodeActionProvider {
195197 if ( commitValue && commitValue . description ) {
196198 let log = '' ;
197199 let args = this . linterConfig . args . slice ( ) ;
200+ args . push ( '--showfile' ) ;
198201 args . push ( '-g' ) ;
199202 args . push ( commitValue . description ) ;
200203
0 commit comments