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.
This commit is contained in:
Winni Neessen 2023-12-08 14:37:32 +01:00
parent 1ea59ecafb
commit c5d8197070
Signed by: wneessen
GPG key ID: 385AC9889632126E
4 changed files with 70 additions and 4 deletions

21
.github/workflows/sonarqube.yml vendored Normal file
View file

@ -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 }}

44
.gitignore vendored
View file

@ -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 <winni@neessen.dev>
#
# 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

8
.idea/.gitignore vendored Normal file
View file

@ -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

1
sonar-project.properties Normal file
View file

@ -0,0 +1 @@
sonar.projectKey=logranger