Opinionated java-library project template

feat: checkstyle changes

kokirigla.de 12124192 9ed23a58

verified
+20 -11
+10 -1
.checkstyle/checkstyle.xml
··· 81 81 value="Avoid using @NotNull annotation. Use @NonNull instead."/> 82 82 </module> 83 83 84 - <!-- https://checkstyle.org/config_naming.html#MethodName --> 84 + <!-- https://checkstyle.org/checks/naming/methodname.html --> 85 85 <module name="MethodName"> 86 86 <property name="format" 87 87 value="^(?:(?:.{1,3})|(?:[gs]et[^A-Z].*)|(?:(?:[^gsA-Z]..|.[^e].|..[^t]).+))$"/> 88 88 </module> 89 + 90 + <!-- https://checkstyle.org/checks/javadoc/missingjavadoctype.html --> 91 + <module name="MissingJavadocType"/> 92 + 93 + <!-- https://checkstyle.org/checks/javadoc/missingjavadocmethod.html --> 94 + <module name="MissingJavadocMethod"/> 95 + 96 + <!-- https://checkstyle.org/checks/javadoc/missingjavadocpackage.html --> 97 + <module name="MissingJavadocPackage"/> 89 98 90 99 <!-- https://checkstyle.org/checks/coding/requirethis.html --> 91 100 <module name="RequireThis"/>
+2 -1
.editorconfig
··· 9 9 ij_continuation_indent_size = 4 10 10 ij_smart_tabs = false 11 11 ij_java_blank_lines_before_class_end = 1 12 - ij_any_blank_lines_after_class_header = 1 12 + ij_any_blank_lines_after_class_header = 1 13 + ij_any_blank_lines_around_field = 1
+2 -2
build-logic/src/main/kotlin/base-conventions.gradle.kts
··· 8 8 version = rootProject.version 9 9 10 10 indra { 11 - gpl3OrLaterLicense() 11 + mitLicense() 12 12 13 13 javaVersions { 14 14 target(25) ··· 20 20 } 21 21 22 22 dependencies { 23 - checkstyle(libs.stylecheck) 23 + checkstyle(libs.checkstyle) 24 24 testImplementation(libs.junit.jupiter) 25 25 testRuntimeOnly(libs.junit.platform.launcher) 26 26 }
+2 -2
gradle/libs.versions.toml
··· 1 1 [versions] 2 2 indra = "4.0.0" 3 - stylecheck = "0.2.1" 3 + checkstyle = "13.2.0" 4 4 shadow = "9.3.1" 5 5 junit = "6.0.2" 6 6 jspecify = "1.0.0" ··· 12 12 shadow = { group = "com.gradleup.shadow", name = "shadow-gradle-plugin", version.ref = "shadow" } 13 13 14 14 # development tools (code quality, annotations) 15 - stylecheck = { group = "ca.stellardrift", name = "stylecheck", version.ref = "stylecheck" } 15 + checkstyle = { group = "com.puppycrawl.tools", name = "checkstyle", version.ref = "checkstyle" } 16 16 jspecify = { group = "org.jspecify", name = "jspecify", version.ref = "jspecify" } 17 17 18 18 # testing
+4 -5
readme.md
··· 3 3 This template is marked [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/). 4 4 5 5 The `license.txt` and `license_header.txt` this template provides are MIT. You will want to change 6 - them if your project will be released under a different license. 6 + them if your project will be released under a different license. Remember to change the license 7 + declaration in `base-conventions.gradle.kts` too. 7 8 8 9 ## Quick start 9 10 ··· 15 16 16 17 ## Checkstyle 17 18 18 - This template uses a fork of checkstyle. For checkstyle support in IntelliJ IDEA: 19 + This template uses checkstyle. For checkstyle support in IntelliJ IDEA: 19 20 20 21 1. Install the checkstyle plugin. 21 - 2. Compile stylecheck from [its repository](https://codeberg.org/stellardrift/stylecheck). 22 - 3. In `Settings` -> `Tools` -> `Checkstyle` `Third-Party Checks`, add the compiled stylecheck jar. 23 - 4. In the `Checkstyle` tab, set the configuration file to `.checkstyle/checkstyle.xml`. 22 + 2. In the `Checkstyle` tab, set the configuration file to `.checkstyle/checkstyle.xml`.