Spell check Maven Plugin

spell checker with specific files contains text which show in UI or message from properties and xml file

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.github.tomxiong
ArtifactId

ArtifactId

spell-check-maven-plugin
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Spell check Maven Plugin
spell checker with specific files contains text which show in UI or message from properties and xml file
Project URL

Project URL

https://github.com/tomxiong/spell-check-maven-plugin
Source Code Management

Source Code Management

http://github.com/tomxiong/spell-check-maven-plugin/tree/main

Download spell-check-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.tomxiong</groupId>
    <artifactId>spell-check-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Dependencies

compile (5)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.6.3
org.codehaus.plexus : plexus-utils jar 3.3.0
org.apache.commons : commons-lang3 jar 3.9
org.apache.maven.shared : file-management jar 3.0.0
io.github.mightguy : symspell-lib jar 6.6.154

provided (2)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0
org.apache.maven : maven-plugin-api jar 3.6.3

test (4)

Group / Artifact Type Version
junit : junit jar 4.13.1
org.apache.maven.shared : maven-plugin-testing-harness jar 1.1
org.mockito : mockito-core jar 3.8.0
org.slf4j : slf4j-simple jar 1.7.21

Project Modules

There are no modules declared in this project.

License: MIT Maven Central CI of Github Action Quality Gate Status FOSSA Status codecov

maven-spell-checker-plugin

The maven plugin for spell checker with specific files contains text which show in UI or message from properties and xml file.

How to use it in maven project

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>

How to execute the spell check in project?

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.

How to find the result of spell check?

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.

How to add your custom dictionary for your domain common language

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

How to get help when you use this plugin

You can file a issue to this project in github if you have any question or find a bug or ask an enhancement.

How to extend the usage

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.

Next plan

  • 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.

License

FOSSA Status

Versions

Version
1.0.0