feat(rules): add Java language rules (#645)

Adds Java language rules (coding-style, hooks, patterns, security, testing) following the established language rule conventions.
This commit is contained in:
Chris Yau
2026-03-20 11:49:21 +08:00
committed by GitHub
parent a9edf54d2f
commit 9ceb699e9a
5 changed files with 509 additions and 0 deletions

18
rules/java/hooks.md Normal file
View File

@@ -0,0 +1,18 @@
---
paths:
- "**/*.java"
- "**/pom.xml"
- "**/build.gradle"
- "**/build.gradle.kts"
---
# Java Hooks
> This file extends [common/hooks.md](../common/hooks.md) with Java-specific content.
## PostToolUse Hooks
Configure in `~/.claude/settings.json`:
- **google-java-format**: Auto-format `.java` files after edit
- **checkstyle**: Run style checks after editing Java files
- **./mvnw compile** or **./gradlew compileJava**: Verify compilation after changes