https://github.com/raydac/char-sniffer
Maven plugin to check char codes in text files
https://github.com/raydac/char-sniffer
java maven-plugin text
Last synced: about 1 month ago
JSON representation
Maven plugin to check char codes in text files
- Host: GitHub
- URL: https://github.com/raydac/char-sniffer
- Owner: raydac
- License: apache-2.0
- Created: 2017-02-23T13:31:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-28T11:28:15.000Z (over 9 years ago)
- Last Synced: 2026-01-14T01:08:56.060Z (6 months ago)
- Topics: java, maven-plugin, text
- Language: Java
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](http://www.apache.org/licenses/LICENSE-2.0)
[](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
[](http://search.maven.org/#artifactdetails|com.igormaznitsa|char-sniffer|1.0.0|jar)
[](https://maven.apache.org/)
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AHWJHJFBAWGL2)
[](https://money.yandex.ru/embed/small.xml?account=41001158080699&quickpay=small&yamoney-payment-type=on&button-text=01&button-size=l&button-color=orange&targets=%D0%9F%D0%BE%D0%B6%D0%B5%D1%80%D1%82%D0%B2%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D0%BD%D0%B0+%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D1%8B+%D1%81+%D0%BE%D1%82%D0%BA%D1%80%D1%8B%D1%82%D1%8B%D0%BC+%D0%B8%D1%81%D1%85%D0%BE%D0%B4%D0%BD%D1%8B%D0%BC+%D0%BA%D0%BE%D0%B4%D0%BE%D0%BC&default-sum=100&successURL=)
# Char Sniffer
A Small easy Maven plugin to check char codes in text files.
# How to use?
For instance to restrict char codes (0-255) in text file License.txt situated in the root project folder, you can use such configuration
```xml
com.igormaznitsa
char-sniffer
1.0.0
sniff
${basedir}/License.txt
true
0
255
```
Also it is possible to define chars which will be only allowed in text files
```xml
com.igormaznitsa
char-sniffer
1.0.0
sniff
${basedir}/License.txt
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ,.'":;/@[]()-=*%0123456789Ü
```
It is possible to disable some chars in text files. For instance below described how to disable © and ™ in text files.
```xml
com.igormaznitsa
char-sniffer
1.0.0
sniff
${basedir}/License.txt
™Ⓒ
```
To be sure that UTF-8 codes of text files are ok, it is possible to use special flag `validateUtf8`, it will check that all UTF-8 chars have normal codes and there is not any broken char.
```xml
com.igormaznitsa
char-sniffer
1.0.0
sniff
${basedir}/License.txt
true
```