From c5d81970701ec53df5e0ff15e0e0f6e0e4113830 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Fri, 8 Dec 2023 14:37:32 +0100 Subject: [PATCH] Add SonarQube configuration and update .gitignore This commit introduces a SonarQube configuration setup, adds an .idea/.gitignore file, and expands the root .gitignore file. The SonarQube setup includes a GitHub Actions workflow and a project properties file. The .gitignore files are updated to properly ignore files for JetBrains IDEs, local testfiles, SonarQube, and others. --- .github/workflows/sonarqube.yml | 21 ++++++++++++++++ .gitignore | 44 ++++++++++++++++++++++++++++++--- .idea/.gitignore | 8 ++++++ sonar-project.properties | 1 + 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 .idea/.gitignore create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 0000000..b6436f0 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,21 @@ +name: Build + +on: + push: + branches: + - main + + +jobs: + build: + name: Build + runs-on: ubuntu-latest + permissions: read-all + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/.gitignore b/.gitignore index 3b735ec..1026e97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# SPDX-FileCopyrightText: 2022 Winni Neessen # +# SPDX-License-Identifier: CC0-1.0 + # Binaries for programs and plugins *.exe *.exe~ @@ -17,5 +18,40 @@ # Dependency directories (remove the comment below to include it) # vendor/ -# Go workspace file -go.work +# Local testfiles and auth data +.auth +examples/* + +# SonarQube +.scannerwork/ + +# IDEA specific ignores +# Source: https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +.idea/ + +# CMake +cmake-build-*/ + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..ed5b717 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=logranger \ No newline at end of file