From 1a3bafe10e8599c21f87573643bf20a609041811 Mon Sep 17 00:00:00 2001
From: Joel von der Weid <joel.von-der-weid@hesge.ch>
Date: Mon, 26 Feb 2024 10:53:51 +0100
Subject: [PATCH] Add sonar in config

---
 config/SharedConfig.ts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/config/SharedConfig.ts b/config/SharedConfig.ts
index 2e1cf15..f161a69 100644
--- a/config/SharedConfig.ts
+++ b/config/SharedConfig.ts
@@ -1,12 +1,14 @@
 class SharedConfig {
     public readonly production: boolean;
     public debug: boolean = false;
+    public useSonar: boolean = false;
 
     public readonly logsFolder: string;
 
 
     constructor() {
         this.production = process.env.NODE_ENV === 'production';
+        this.useSonar = ['yes', 'true', '1', 'on'].includes(process.env.USE_SONAR?.trim()?.toLowerCase() ?? '');
 
         this.logsFolder = process.env.LOGS_FOLDER ?? '';
     }
-- 
GitLab