Cross-language coding standard (K22-CODE-01..26) adopted from Kingsrook's QQQ CODE_STYLE.md, with profiles for C#/.NET, Java, TypeScript, Python, Rust, Go, Swift, Shell/PowerShell, and Terraform, and the files each IDE and tool imports: IntelliJ scheme, copyright profile and live templates, Checkstyle, Eclipse formatter, .editorconfig, Directory.Build.props, ESLint Stylistic, ruff, rustfmt/clippy/cargo-deny, golangci-lint, swift-format/SwiftLint, ShellCheck, PSScriptAnalyzer, TFLint, sqlfluff, VS Code. Kingsrook files keep their Apache-2.0 notice (NOTICE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: James Maes <james@kof22.com>
Java
Build-time enforcement of the Java profile.
| File | Purpose |
|---|---|
checkstyle/checkstyle.xml |
The KofTwentyTwo Checkstyle config. Kingsrook rules plus the KofTwentyTwo SPDX header and a ban on System.out/System.err/printStackTrace(). Self-contained, so it also works from its URL |
checkstyle/kingsrook/ |
Kingsrook's original config and QQQ license header, unmodified, for QQQ-derived projects |
maven-checkstyle.xml |
Maven plugin block: Checkstyle 14.3.0 in the validate phase, failing on any warning |
gradle-checkstyle.gradle.kts |
Gradle equivalent: checkstyle plugin, maxWarnings = 0 |
license-header.txt |
The source header ($YEAR placeholder) for tools that insert headers (Spotless licenseHeaderFile, IDE templates) |
Published URL (always the latest on main):
https://raw.githubusercontent.com/KofTwentyTwo/standards/main/configs/java/checkstyle/checkstyle.xml
Maven
- Copy
checkstyle/checkstyle.xmltocheckstyle/checkstyle.xmlin the repository (a local copy keeps builds reproducible; update it when this repository releases). - Paste the
<plugin>block frommaven-checkstyle.xmlinto<build><plugins>. ./mvnw -B verifynow fails on any violation, locally and in CI.
Gradle
Copy checkstyle/checkstyle.xml as above, then add the contents of
gradle-checkstyle.gradle.kts to build.gradle.kts. ./gradlew check fails on any
violation.
IDEs
- IntelliJ: see
../intellij(code-style scheme + CheckStyle-IDEA). - Eclipse: import
../eclipse/eclipse-formatter.xmland install the Checkstyle plug-in pointed at the URL above. - VS Code:
../vscode/settings.jsonsetsjava.format.settings.urlandjava.checkstyle.configurationto the published files.
Verified
Checkstyle 14.3.0 (CLI and maven-checkstyle-plugin 3.6.0 on Maven 3.9.16, JDK 21):
a Kingsrook-style file passes; a file with 4-space indentation, same-line braces, a star
import, no banner Javadoc, System.out, printStackTrace(), and no SPDX header fails
with 17 violations. The Gradle snippet follows Gradle's documented checkstyle plugin
API and was not run here (no Gradle installation).