From a861649249c6b3b25187e4b4a41eea7c375eba49 Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 20 Jun 2024 17:13:38 +0100 Subject: [PATCH 1/2] fix sonar (again!) --- .github/workflows/sonar_check.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sonar_check.yml b/.github/workflows/sonar_check.yml index 105136618..38e306ade 100644 --- a/.github/workflows/sonar_check.yml +++ b/.github/workflows/sonar_check.yml @@ -1,30 +1,29 @@ +# see https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c#usage name: Sonar Check + on: push: branches: - dev pull_request: types: [opened, synchronize, reopened] + jobs: build: name: Build and analyze runs-on: ubuntu-latest - # if: github.repository_owner == 'emsesp' - # if: github.repository == 'emsesp/EMS-ESP32' env: BUILD_WRAPPER_OUT_DIR: bw-output steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + fetch-depth: 0 - name: Install sonar-scanner and build-wrapper uses: SonarSource/sonarcloud-github-c-cpp@v2 - name: Run build-wrapper - run: | - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make all + run: build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make all - name: Run sonar-scanner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - sonar-scanner + run: sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" From 12701b2143542fb3c98429dfccb4593384c462be Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 20 Jun 2024 17:13:50 +0100 Subject: [PATCH 2/2] max shower min duration 6 minutes --- interface/src/project/validators.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/project/validators.ts b/interface/src/project/validators.ts index c721dca84..c60b0a2da 100644 --- a/interface/src/project/validators.ts +++ b/interface/src/project/validators.ts @@ -238,9 +238,9 @@ export const createSettingsValidator = (settings: Settings) => shower_min_duration: [ { type: 'number', - min: 1, - max: 3000, - message: 'Time must be between 1 and 3000 seconds' + min: 10, + max: 360, + message: 'Time must be between 10 and 360 seconds' } ] }),