Custom Checkstyle checks for Java projects.
Check | Description |
---|---|
UtilityClassPrivateConstructorCheck |
Check primary private constructor in Utility class |
Add https://jitpack.io
as Maven repository to build.gradle
(needs for downloading dependencies from GitHub):
repositories {
maven {
url "https://jitpack.io"
}
}
If you are using Checkstyle plugin for Gradle, add
checks project as dependency in the dependencies
section in the build.gradle
:
checkstyle 'com.github.fartem:checkstyle-checks-java:master'
Add to TreeWalker
module:
<module name="com.smlnskgmail.jaman.checkstyle.checks.UtilityClassPrivateConstructorCheck">
<property name="id" value="UtilityClassPrivateConstructorCheck"/>
</module>
Read Commit Convention. Make sure your build is green before you contribute your pull request. Then:
./gradlew clean
./gradlew build
If you don't see any error messages, submit your pull request.
- @fartem as Artem Fomchenkov