SonarQube Grammar Plugin to provide spell checking of source code.
- Download SonarQube (current version 5.1) from SonarQube homepage
- Unpack and go to sonarqube-5.1/conf folder
- Enable the development mode on server : add
bash sonar.dev=true
to sonar.properties . For Windows machines usesonar.dev=true
. - Go to folder sonarqube-5.1/bin. Select you current OS and run SonarQube (can be ".bat" or ".sh" file)
- In browser go to - http://localhost:9000/
- Login in SonarQube as Administrator (login - admin, password - admin)
- On SonarQube page top menu go to the "Quality Profiles". You need to make sure that "Sonar way " stands as the default
- Make some code changes
- Build and install the plugin :
bash mvn package org.codehaus.sonar:sonar-dev-maven-plugin::upload -DsonarHome={sonarqube-5.1} -DsonarUrl=http://localhost:9000
. Use correct location of Sonarqube for the parameter -DsonarHome, for example-DsonarHome=d:\Sonar5.1
- Restart SonarQube
- Change on SonarQube page top menu "Quality Profiles"
Sonar Grammar Profile
to default. - To perform grammar analysis go to the project that you want to test and write
bash mvn sonar:sonar
command (for Windows machines usemvn sonar:sonar
), for debug usebash mvnDebug sonar:sonar
command (by default debug port is 8000) - After that you can see results on http://localhost:9000/dashboard/ or follow the link that will be found in the bottom of command line output
There is built in dictionary, however to add additional words here is a bash script to rearrange dictionary. To do this - append new word to src/main/resources/dict/english.0, run reprocess_dict.sh after that copy src/main/resources/dict/english.1 with new word and in correct format to src/main/resources/dict/english.0.