Skip to content

Sonar Grammar Plugin to provide spell checking of source code

Notifications You must be signed in to change notification settings

DenysZabolotnyi/sonar-grammar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonar-grammar

SonarQube Grammar Plugin to provide spell checking of source code.

Status

Build Status Bitdeli Badge

Environment requirements:

  1. Java 1.7
  2. Maven
  3. SonarQube (current version 5.1)

Development Set Up:

  1. Download SonarQube (current version 5.1) from SonarQube homepage
  2. Unpack and go to sonarqube-5.1/conf folder
  3. Enable the development mode on server : add bash sonar.dev=true to sonar.properties . For Windows machines use sonar.dev=true.
  4. Go to folder sonarqube-5.1/bin. Select you current OS and run SonarQube (can be ".bat" or ".sh" file)
  5. In browser go to - http://localhost:9000/
  6. Login in SonarQube as Administrator (login - admin, password - admin)
  7. On SonarQube page top menu go to the "Quality Profiles". You need to make sure that "Sonar way " stands as the default

Development and run:

  1. Make some code changes
  2. 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
  3. Restart SonarQube
  4. Change on SonarQube page top menu "Quality Profiles" Sonar Grammar Profile to default.
  5. To perform grammar analysis go to the project that you want to test and write bash mvn sonar:sonar command (for Windows machines use mvn sonar:sonar), for debug use bash mvnDebug sonar:sonar command (by default debug port is 8000)
  6. 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

Amend dictionary:

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.

About

Sonar Grammar Plugin to provide spell checking of source code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 97.8%
  • HTML 1.9%
  • Shell 0.3%