- Start Sonarqube container from Docker. Run this command in your terminal:
docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest
-
Wait until the server has started inside Docker. You can retry step 3 until it works or check the container logs.
-
Go to
http://localhost:9000
and login. Default username/password isadmin/admin
. -
You will be asked to change password. Do it!
- Create a file named
secret.properties
insrc/main/resources
. The following secrets are required to run the application.
discord.bot.token=yourToken
sonar.user=admin
sonar.password=yourNewPassword
- Run application.
- Make sure bot is online in the Discord-server.
- Write a message with a code block. The message must contain only a code block.
- Check application log to see result (the bot doesn't answer properly yet)
- Click the link to see the result.
Use three backticks to open and close the block:
SonarQube supports many languages, but the bot only supports Java at this moment.
Make sure your entire message must be contained in a code block. If the bot still couldn't analyze your code it will notify you.
The application has some bugs and can crash. If you cannot get the application to work, remove the Sonarqube container
and start over from How to run
.
You can report issues or make a pull request if you want to fix something.