I install sonar-scanner via docker on my mac
(https://hub.docker.com/r/sonarsource/sonar-scanner-cli) and I getting the error "You must define the following mandatory properties for 'Unknown': sonar.projectKey".
I have done the following:
1: add a sonar-scanner.properties file in the root of JS project
# Required metadata
sonar.projectKey=my-app
sonar.projectName=Franchise
sonar.projectVersion=1.0
# Comma-separated paths to directories with sources (required)
sonar.sources=server/app.js,pages,components
2 Installed docker and the scanner
Here my docker command
docker run --rm -e SONAR_HOST_URL="https://sonarqube.comp.com/" -e SONAR.PROJECTKEY="my-app" -v "/git/franchises" sonarsource/sonar-scanner-cli
Can please let me know how to pass the information correctly.
Thanks