The maven plugin for spell checker with specific files contains text which show in UI or message from properties and xml file.
Add below plugin to pom file
<plugin>
<groupId>com.github.tomxiong</groupId>
<artifactId>spell-check-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/esapi/**</exclude>
</excludes>
<map>
<simple-rule>name,comments,help</simple-rule>
<severity-family>name,comments,help</severity-family>
<message>CDATA</message>
<string-rv>CDATA</string-rv>
</map>
<allowWord>foglight,fglam,pi,fgl</allowWord>
<customDictionaryFile>customWord.txt</customDictionaryFile>
</configuration>
</plugin>
You can execute mvn install to build the project and the check action will be executed in validate step or you can execute below:
mvn com.github.tomxiong:spell-check-maven-plugin:check
It will execute spell check for all text of UI element or properties of you custom Note: This plugin support properties file, java, groovy by default.For xml, you should define which part contains text show in ui, so the plugin will figure out the text base on the definition.
mvn com.github.tomxiong:spell-check-maven-plugin:list
It will list all text instead of check. We can use it to build your custom dictionary base on your domain common language with this list file. Note: It will help the user to tuning the definition of xml ui or custom dictionary.
You can find the spelling_check_result.txt as the spell check result in the target folder of the project when you execute the spell check.
You can add for a few words or add a txt file to for a lot of words. Note: the customDictionaryFile format like below:
NAS
Cratio
You can file a issue to this project in github if you have any question or find a bug or ask an enhancement.
Because its target to check the UI for specific UI project which using XML and properties to build the message of UI. You can fork it and improve it by yourselves.
- Add groovy script support custom logical to find out the text element of XML ui
- Add ML support to build custom dictionary base on the specific domain of projects.