Great to see you on this page! It means you are interested in how Checkstyle Addons is built or you are even considering a contribution.
If you’ve got an idea or - even better - some code for a new high-quality check, we should talk about getting it on board. In fact, you can put it on board yourself by creating a pull request for it (more below). The same is true for all kinds of improvements, including improvements to the website.
Checkstyle Addons is using the GitHub Actions
continuous integration system. Every push to master and every pull request are automatically built by GitHub Actions.
If the GitHub Actions status is passing, then it was successfully built with different
Checkstyle versions, and all unit tests were successful.
Test coverage is measured by Codecov. The badge below
shows the current coverage, which is recomputed upon every successful build. Also, the coverage is calculated for every
pull request, and reported on the pull request’s discussion page.
Checkstyle Addons follows a Fork & Pull collaboration model, which means that all changes go through pull
requests.
Please feel free to suggest anything that’s good. If you are going to expend a lot of work, it may make sense to
open an issue
about it first, so we can discuss your plans.
In order to build Checkstyle Addons yourself, follow these steps:
In order to do a full build of Checkstyle Addons, we actually need all three JDKs at the same time. It’s no problem to have them all installed as long as each has its own distinct directory. The build process itself must run on Java 11. It is basically possible to skip installing the other JDKs, but then the build will not create artifacts compatible with older versions of Java or older Versions of Checkstyle.
JAVA_HOME
points to the Java 11 SDK, for example
C:\PROGRA~1\Java\jdk-11.0.11.9-hotspot
(Windows)..gradle
somewhere,
for example D:\.gradle
(Windows) or ~/.gradle
(Unix). Create an environment variable GRADLE_USER_HOME
which
points to this directory. It may grow quite large over time, because Gradle uses it to cache all downloaded stuff.
Mine is almost 10 GB. All Gradle processes, including your IDE, should see this environment variable.Create an empty text file in $GRADLE_USER_HOME
called gradle.properties
. Inside, add the following lines:
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx3062m -XX:MaxPermSize=384m
checkstyleaddons_jdk7_java=C:/PROGRA~1/Java/zulu-7/bin/java.exe
checkstyleaddons_jdk7_javac=C:/PROGRA~1/Java/zulu-7/bin/javac.exe
checkstyleaddons_jdk7_javadoc=C:/PROGRA~1/Java/zulu-7/bin/javadoc.exe
checkstyleaddons_jdk8_java=C:/PROGRA~1/Java/jdk-8.0.302.8-hotspot/bin/java.exe
checkstyleaddons_jdk8_javac=C:/PROGRA~1/Java/jdk-8.0.302.8-hotspot/bin/javac.exe
checkstyleaddons_jdk8_javadoc=C:/PROGRA~1/Java/jdk-8.0.302.8-hotspot/bin/javadoc.exe
The first two lines are optional and may be left out if the build works for you. The other lines basically configure where the executables from the lower version JDKs are at. This is used to build artifacts compatible with previous versions of Java. If these properties are missing, those artifacts will not be created. Adjust the paths depending on where you installed your Java 7 and Java 8 SDKs). The paths should not contain spaces (may still work, but not tested).
git clone https://github.com/checkstyle-addons/checkstyle-addons.git
cd checkstyle-addons
./gradlew build
In case you want to use IntelliJ IDEA as your IDE to develop Checkstyle Addons, you need to make sure that these settings are configured correctly:
Running the website locally is important in order to be able to test changes before they go online. The Checkstyle Addons website is based on Jekyll, GitHub’s lightweight but powerful CMS. The website theme is Thomas Park’s SpaceLab theme, which is based on Bootstrap. Markdown is GitHub-flavored markdown (GFM), processed by kramdown (the GitHub pages standard). Syntax highlighting by Rouge (again, the GitHub standard). It is technically possible to use Jemoji in the bodies of pages and posts.
gem install jekyll
, and may take a minute or two because lots of stuff is downloaded from the internet.gem install rouge
on the command line. Rouge is the highlighter required by
GitHub at this time.gem install wdm
) and Jemojis (gem install jemoji
)git clone https://github.com/checkstyle-addons/checkstyle-addons.git
cd checkstyle-addons
git checkout gh-pages
jekyll serve --watch --incremental
Now you can browse the website at http://localhost:4000
A quick list of development resources:
While Checkstyle Addons tries to be as open as possible for new ideas and new code, it is also focused on quality. Thus, there are a small number of criteria that new code must meet:
gradlew clean build site
runs without errors.People rely on Checkstyle Addons to work as documented, so it is most important to minimize bugs and have good documentation. The idea is to provide a stable and correct tool, so fixing known bugs if and when they arise has the highest priority (more than new features).