@@ -165,7 +165,7 @@ export class CodeQLCliServer implements Disposable {
165165 // If the server is not running a command run this immediately
166166 // otherwise add to the front of the queue (as we want to run this after the next command()).
167167 if ( this . commandInProcess ) {
168- this . commandQueue . unshift ( callback )
168+ this . commandQueue . unshift ( callback ) ;
169169 } else {
170170 callback ( ) ;
171171 }
@@ -188,19 +188,19 @@ export class CodeQLCliServer implements Disposable {
188188 */
189189 private async launchProcess ( ) : Promise < child_process . ChildProcessWithoutNullStreams > {
190190 const config = await this . getCodeQlPath ( ) ;
191- return spawnServer ( config , "CodeQL CLI Server" , [ "execute" , "cli-server" ] , [ ] , this . logger , _data => { /**/ } )
191+ return spawnServer ( config , "CodeQL CLI Server" , [ "execute" , "cli-server" ] , [ ] , this . logger , _data => { /**/ } ) ;
192192 }
193193
194194 private async runCodeQlCliInternal ( command : string [ ] , commandArgs : string [ ] , description : string ) : Promise < string > {
195195 const stderrBuffers : Buffer [ ] = [ ] ;
196196 if ( this . commandInProcess ) {
197- throw new Error ( "runCodeQlCliInternal called while cli was running" )
197+ throw new Error ( "runCodeQlCliInternal called while cli was running" ) ;
198198 }
199199 this . commandInProcess = true ;
200200 try {
201201 //Launch the process if it doesn't exist
202202 if ( ! this . process ) {
203- this . process = await this . launchProcess ( )
203+ this . process = await this . launchProcess ( ) ;
204204 }
205205 // Grab the process so that typescript know that it is always defined.
206206 const process = this . process ;
@@ -230,8 +230,8 @@ export class CodeQLCliServer implements Disposable {
230230 // Listen for process exit.
231231 process . addListener ( "close" , ( code ) => reject ( code ) ) ;
232232 // Write the command followed by a null terminator.
233- process . stdin . write ( JSON . stringify ( args ) , "utf8" )
234- process . stdin . write ( this . nullBuffer )
233+ process . stdin . write ( JSON . stringify ( args ) , "utf8" ) ;
234+ process . stdin . write ( this . nullBuffer ) ;
235235 } ) ;
236236 // Join all the data together
237237 const fullBuffer = Buffer . concat ( stdoutBuffers ) ;
@@ -252,8 +252,8 @@ export class CodeQLCliServer implements Disposable {
252252 } finally {
253253 this . logger . log ( Buffer . concat ( stderrBuffers ) . toString ( "utf8" ) ) ;
254254 // Remove the listeners we set up.
255- process . stdout . removeAllListeners ( 'data' )
256- process . stderr . removeAllListeners ( 'data' )
255+ process . stdout . removeAllListeners ( 'data' ) ;
256+ process . stderr . removeAllListeners ( 'data' ) ;
257257 process . removeAllListeners ( "close" ) ;
258258 }
259259 } finally {
@@ -349,7 +349,7 @@ export class CodeQLCliServer implements Disposable {
349349 try {
350350 yield JSON . parse ( event ) as EventType ;
351351 } catch ( err ) {
352- throw new Error ( `Parsing output of ${ description } failed: ${ err . stderr || err } ` )
352+ throw new Error ( `Parsing output of ${ description } failed: ${ err . stderr || err } ` ) ;
353353 }
354354 }
355355 }
@@ -375,11 +375,11 @@ export class CodeQLCliServer implements Disposable {
375375 } catch ( err ) {
376376 reject ( err ) ;
377377 }
378- }
378+ } ;
379379 // If the server is not running a command, then run the given command immediately,
380380 // otherwise add to the queue
381381 if ( this . commandInProcess ) {
382- this . commandQueue . push ( callback )
382+ this . commandQueue . push ( callback ) ;
383383 } else {
384384 callback ( ) ;
385385 }
@@ -401,7 +401,7 @@ export class CodeQLCliServer implements Disposable {
401401 try {
402402 return JSON . parse ( result ) as OutputType ;
403403 } catch ( err ) {
404- throw new Error ( `Parsing output of ${ description } failed: ${ err . stderr || err } ` )
404+ throw new Error ( `Parsing output of ${ description } failed: ${ err . stderr || err } ` ) ;
405405 }
406406 }
407407
@@ -535,12 +535,12 @@ export class CodeQLCliServer implements Disposable {
535535 try {
536536 output = await fs . readFile ( interpretedResultsPath , 'utf8' ) ;
537537 } catch ( err ) {
538- throw new Error ( `Reading output of interpretation failed: ${ err . stderr || err } ` )
538+ throw new Error ( `Reading output of interpretation failed: ${ err . stderr || err } ` ) ;
539539 }
540540 try {
541541 return JSON . parse ( output ) as sarif . Log ;
542542 } catch ( err ) {
543- throw new Error ( `Parsing output of interpretation failed: ${ err . stderr || err } ` )
543+ throw new Error ( `Parsing output of interpretation failed: ${ err . stderr || err } ` ) ;
544544 }
545545 }
546546
@@ -714,7 +714,7 @@ export async function runCodeQlCliCommand(codeQlPath: string, command: string[],
714714 logger . log ( `CLI command succeeded.` ) ;
715715 return result . stdout ;
716716 } catch ( err ) {
717- throw new Error ( `${ description } failed: ${ err . stderr || err } ` )
717+ throw new Error ( `${ description } failed: ${ err . stderr || err } ` ) ;
718718 }
719719}
720720
0 commit comments