From 59308a719fdee1a2025e90a18774d56fc6d11d9b Mon Sep 17 00:00:00 2001 From: Joel von der Weid <joel.von-der-weid@hesge.ch> Date: Wed, 3 Jul 2024 13:26:51 +0200 Subject: [PATCH] Fix sonar success bug --- helpers/Dojo/AssignmentValidator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/Dojo/AssignmentValidator.ts b/helpers/Dojo/AssignmentValidator.ts index c6716fb..d831a1c 100644 --- a/helpers/Dojo/AssignmentValidator.ts +++ b/helpers/Dojo/AssignmentValidator.ts @@ -313,7 +313,7 @@ class AssignmentValidator { const runSuccess = SonarAnalyzer.runAnalysis(this.assignment.sonarKey, this.assignment.language, this.assignmentFile.buildLine); - if ( runSuccess ) { + if ( !runSuccess ) { if ( !this.assignment.allowSonarFailure ) { this.emitError(`Sonar gate failed`, 'Sonar analysis failure', AssignmentCheckerError.SONAR_ANALYSIS_FAILED); return; -- GitLab