Welcome 
You didn’t provide details like language, i.e. Java, which build tool … etc.
Here is a great post that might help
There’s also a github repo with scanning examples
https://github.com/SonarSource/sonar-scanning-examples
and the sonarqube documentation
Gilbert