@@ -366,7 +366,10 @@ const predefinedTasks: PredefinedTask[] = [
366366 * both 'ada' and 'spark' tasks.
367367 */
368368export class SimpleTaskProvider implements vscode . TaskProvider {
369- constructor ( public taskType : string , private taskDecls : PredefinedTask [ ] ) { }
369+ constructor (
370+ public taskType : string ,
371+ private taskDecls : PredefinedTask [ ] ,
372+ ) { }
370373
371374 async provideTasks ( token ?: vscode . CancellationToken ) : Promise < vscode . Task [ ] > {
372375 if ( token ?. isCancellationRequested ) {
@@ -433,7 +436,7 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
433436 } ;
434437
435438 return [ buildTask , runTask , buildAndRunTask ] ;
436- } )
439+ } ) ,
437440 ) ;
438441 }
439442
@@ -461,7 +464,7 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
461464 tDecl . label ,
462465 tDecl . taskDef . type ,
463466 undefined ,
464- tDecl . problemMatchers
467+ tDecl . problemMatchers ,
465468 ) ;
466469
467470 /**
@@ -491,7 +494,7 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
491494
492495 async resolveTask (
493496 task : vscode . Task ,
494- token ?: vscode . CancellationToken
497+ token ?: vscode . CancellationToken ,
495498 ) : Promise < vscode . Task | undefined > {
496499 /**
497500 * Note that this method is never called for tasks created by the
@@ -533,9 +536,8 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
533536 */
534537 const args = taskDef . args ?? [ ] ;
535538 try {
536- const evaluatedArgs : ( string | vscode . ShellQuotedString ) [ ] = await evaluateArgs (
537- args
538- ) ;
539+ const evaluatedArgs : ( string | vscode . ShellQuotedString ) [ ] =
540+ await evaluateArgs ( args ) ;
539541 execution = new vscode . ShellExecution ( taskDef . command , evaluatedArgs ) ;
540542 } catch ( err ) {
541543 let msg = 'Error while evaluating task arguments.' ;
@@ -555,7 +557,7 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
555557 task . name ,
556558 task . source ,
557559 execution ,
558- task . problemMatchers
560+ task . problemMatchers ,
559561 ) ;
560562 }
561563
@@ -630,12 +632,12 @@ async function useAlire() {
630632 */
631633async function evaluateArgs ( args : ( string | vscode . ShellQuotedString ) [ ] ) {
632634 const commandRegex = new RegExp (
633- `^\\\${command:\\s*((${ TASK_TYPE_ADA } |${ TASK_TYPE_SPARK } )\\.[^}]*)\\s*}$`
635+ `^\\\${command:\\s*((${ TASK_TYPE_ADA } |${ TASK_TYPE_SPARK } )\\.[^}]*)\\s*}$` ,
634636 ) ;
635637 const evaluatedArgs : ( string | vscode . ShellQuotedString ) [ ] = (
636638 await Promise . all (
637639 args . flatMap ( async function (
638- a : string | vscode . ShellQuotedString
640+ a : string | vscode . ShellQuotedString ,
639641 ) : Promise < ( string | vscode . ShellQuotedString ) [ ] > {
640642 if ( typeof a == 'string' ) {
641643 /**
@@ -675,7 +677,7 @@ async function evaluateArgs(args: (string | vscode.ShellQuotedString)[]) {
675677 }
676678
677679 return [ a ] ;
678- } )
680+ } ) ,
679681 )
680682 ) . flat ( ) ;
681683 return evaluatedArgs ;
@@ -750,14 +752,14 @@ export function getBuildAndRunTaskName(main?: AdaMain) {
750752export function createSparkTaskProvider ( ) : SimpleTaskProvider {
751753 return new SimpleTaskProvider (
752754 TASK_TYPE_SPARK ,
753- predefinedTasks . filter ( ( v ) => v . taskDef . type == TASK_TYPE_SPARK )
755+ predefinedTasks . filter ( ( v ) => v . taskDef . type == TASK_TYPE_SPARK ) ,
754756 ) ;
755757}
756758
757759export function createAdaTaskProvider ( ) : SimpleTaskProvider {
758760 return new SimpleTaskProvider (
759761 TASK_TYPE_ADA ,
760- predefinedTasks . filter ( ( v ) => v . taskDef . type == TASK_TYPE_ADA )
762+ predefinedTasks . filter ( ( v ) => v . taskDef . type == TASK_TYPE_ADA ) ,
761763 ) ;
762764}
763765
@@ -857,7 +859,7 @@ abstract class SequentialExecution extends vscode.CustomExecution {
857859 } finally {
858860 closeEmitter . fire ( 2 ) ;
859861 }
860- }
862+ } ,
861863 ) ;
862864 } ,
863865 close ( ) {
@@ -891,7 +893,7 @@ abstract class SequentialExecution extends vscode.CustomExecution {
891893 */
892894export async function findTaskByName (
893895 taskName : string ,
894- tasks ?: vscode . Task [ ]
896+ tasks ?: vscode . Task [ ] ,
895897) : Promise < vscode . Task > {
896898 if ( ! tasks ) {
897899 tasks = (
@@ -929,7 +931,10 @@ export async function findTaskByName(
929931 * of the tasks to run are given at construction.
930932 */
931933class SequentialExecutionByName extends SequentialExecution {
932- constructor ( private taskName : string , private taskNames : string [ ] ) {
934+ constructor (
935+ private taskName : string ,
936+ private taskNames : string [ ] ,
937+ ) {
933938 super ( ) ;
934939 }
935940
@@ -949,7 +954,7 @@ class SequentialExecutionByName extends SequentialExecution {
949954 */
950955function runTaskSequence (
951956 tasks : vscode . Task [ ] ,
952- writeEmitter : vscode . EventEmitter < string >
957+ writeEmitter : vscode . EventEmitter < string > ,
953958) : Promise < number > {
954959 let p = new Promise < number > ( ( resolve ) => resolve ( 0 ) ) ;
955960 for ( const t of tasks ) {
@@ -1004,15 +1009,15 @@ export async function getBuildAndRunTasks(): Promise<vscode.Task[]> {
10041009 . filter ( ( t ) => getConventionalTaskLabel ( t ) . startsWith ( getBuildAndRunTaskName ( ) ) )
10051010
10061011 // Return workspace-defined tasks first
1007- . sort ( workspaceTasksFirst )
1012+ . sort ( workspaceTasksFirst ) ,
10081013 ) ;
10091014}
10101015
10111016export async function findBuildAndRunTask ( adaMain : AdaMain ) : Promise < vscode . Task | undefined > {
10121017 return ( await getBuildAndRunTasks ( ) ) . find (
10131018 // Tasks defined in tasks.json will have a leading 'ada: ' while the
10141019 // ones auto-generated by the extension don't. We want to match both.
1015- ( t ) => getConventionalTaskLabel ( t ) == getBuildAndRunTaskName ( adaMain )
1020+ ( t ) => getConventionalTaskLabel ( t ) == getBuildAndRunTaskName ( adaMain ) ,
10161021 ) ;
10171022}
10181023
@@ -1047,15 +1052,15 @@ export async function getBuildMainTasks() {
10471052 tasks
10481053 . filter ( ( t ) => getConventionalTaskLabel ( t ) . startsWith ( getBuildTaskName ( ) ) )
10491054 // Return workspace-defined tasks first
1050- . sort ( workspaceTasksFirst )
1055+ . sort ( workspaceTasksFirst ) ,
10511056 ) ;
10521057}
10531058
10541059export async function findBuildMainTask ( adaMain : AdaMain ) : Promise < vscode . Task | undefined > {
10551060 return ( await getBuildMainTasks ( ) ) . find (
10561061 // Tasks defined in tasks.json will have a leading 'ada: ' while the
10571062 // ones auto-generated by the extension don't. We want to match both.
1058- ( t ) => getConventionalTaskLabel ( t ) == getBuildTaskName ( adaMain )
1063+ ( t ) => getConventionalTaskLabel ( t ) == getBuildTaskName ( adaMain ) ,
10591064 ) ;
10601065}
10611066
0 commit comments