Skip to content

Instantly share code, notes, and snippets.

@HariSekhon
Created June 7, 2025 21:23
Show Gist options
  • Save HariSekhon/882b92b029b8923699dee5a43e3aeadb to your computer and use it in GitHub Desktop.
Save HariSekhon/882b92b029b8923699dee5a43e3aeadb to your computer and use it in GitHub Desktop.
sonarcloud.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowledge-Base

SonarCloud

Cloud hosted version of SonarQube.

SonarCloud Config

When you add to SonarCloud web UI and add your project it'll give you a sample config, which should look like this:

From DevOps-Bash-tools - sonar-project.properties:

sonar.host.url=https://sonarcloud.io

# Required metadata
sonar.organization=harisekhon
sonar.projectName=DevOps-Bash-tools
sonar.projectKey=HariSekhon_DevOps-Bash-tools
sonar.projectVersion=1.0

sonar.projectDescription=DevOps-Bash-tools

# Some nice optional bits to add for the UI
sonar.links.homepage=https://github.com/HariSekhon/DevOps-Bash-tools
sonar.links.scm=https://github.com/HariSekhon/DevOps-Bash-tools
sonar.links.issue=https://github.com/HariSekhon/DevOps-Bash-tools/issues
sonar.links.ci=https://github.com/HariSekhon/DevOps-Bash-tools/actions

# directories to scan (defaults to sonar-project.properties dir otherwise)
sonar.sources=.

#sonar.language=py

sonar.sourceEncoding=UTF-8

#sonar.exclusions=**/tests/**
sonar.exclusions=**/zookeeper-*/**/*

Generate config for the IntelliJ SonarLint plugin

Instead of clicking through the IntelliJ UI to configure the SonarLint plugin, you can run this script from DevOps-Bash-tools to generate the same config:

sonarlint_generate_config.sh

Combine with git_foreach_repo.sh to iterate through all your git checkouts to generate it for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment