Skip to content

Commit

Permalink
refactor, Add the assessments for each task only after checking the e…
Browse files Browse the repository at this point in the history
…rrors

Part of #237
  • Loading branch information
ruiAzevedo19 committed Jul 5, 2024
1 parent e6c1853 commit 8a753c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evaluate/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ func Evaluate(ctx *Context) (assessments *report.AssessmentStore, totalScore uin
Logger: ctx.Log,
}
assessment, ps, err := task.Run(taskContext)
assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment)
if err != nil {
ps = append(ps, err)
}
Expand All @@ -145,6 +144,7 @@ func Evaluate(ctx *Context) (assessments *report.AssessmentStore, totalScore uin
} else {
modelSucceededBasicChecksOfLanguage[model][language] = true
}
assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment)
}
})
}
Expand Down Expand Up @@ -244,11 +244,11 @@ func Evaluate(ctx *Context) (assessments *report.AssessmentStore, totalScore uin
Logger: ctx.Log,
}
assessment, ps, err := task.Run(taskContext)
assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment)
problemsPerModel[modelID] = append(problemsPerModel[modelID], ps...)
if err != nil {
ctx.Log.Printf("ERROR: Model %q encountered a hard error for language %q, repository %q: %+v", modelID, languageID, repositoryPath, err)
}
assessments.AddAssessmentPerTask(model, language, repositoryPath, assessment)
}
})
}
Expand Down

0 comments on commit 8a753c9

Please sign in to comment.