From a9da859ee5d8cc1dcb919779546040060d9d8876 Mon Sep 17 00:00:00 2001 From: uturunku1 Date: Tue, 4 Jan 2022 16:39:43 -0500 Subject: [PATCH] rename variables to something more descriptive --- internal/cloud/backend_runTasks.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/cloud/backend_runTasks.go b/internal/cloud/backend_runTasks.go index 6b5b0a8126..890bf9231d 100644 --- a/internal/cloud/backend_runTasks.go +++ b/internal/cloud/backend_runTasks.go @@ -19,31 +19,31 @@ type taskResultSummary struct { type taskStageReadFunc func(b *Cloud, stopCtx context.Context) (*tfe.TaskStage, error) func summarizeTaskResults(taskResults []*tfe.TaskResult) *taskResultSummary { - var pe, er, erm, pa int + var pendingCount, errCount, errMandatoryCount, passedCount int for _, task := range taskResults { if task.Status == "unreachable" { return &taskResultSummary{ unreachable: true, } - } else if task.Status == "running" || task.Status == "pending" { - pe++ + } else if task.Status == "running" || task.Status == "pendingCountnding" { + pendingCount++ } else if task.Status == "passed" { - pa++ + passedCount++ } else { // Everything else is a failure - er++ + errCount++ if task.WorkspaceTaskEnforcementLevel == "mandatory" { - erm++ + errMandatoryCount++ } } } return &taskResultSummary{ unreachable: false, - pending: pe, - failed: er, - failedMandatory: erm, - passed: pa, + pending: pendingCount, + failed: errCount, + failedMandatory: errMandatoryCount, + passed: passedCount, } }