Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .claude/skills/using-gradle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ Compile a single module without running tests:
./gradlew :fdb-record-layer-core:compileJava
```

# Style / static analysis checks

**Run this before pushing or opening a PR.** CI's `style` job (`.github/workflows/pull_request.yml`)
runs `./gradlew build -x test -x destructiveTest -x scalarFallbackTest -PspotbugsEnableHtmlReport`,
which includes Checkstyle, PMD, and SpotBugs across every module. That's slow for local
iteration — scope it to the modules you actually touched:

```
./gradlew :fdb-relational-core:check :fdb-record-layer-core:check -x test -x destructiveTest -x scalarFallbackTest -PspotbugsEnableHtmlReport
```

Reports on failure land at `<module>/.out/reports/checkstyle/*.html`, `<module>/.out/reports/pmd/*.html`,
and (with `-PspotbugsEnableHtmlReport`) `<module>/.out/reports/spotbugs/*.html`. The failure
output in the console also prints the exact file, line, and rule.

Common violations you'll hit when merging/rebasing branches by hand:
- Checkstyle `RedundantImport` — importing a class that's in the same package as the file, or
the same class imported twice (easy to introduce when resolving import-block merge conflicts).
- PMD `UnnecessaryFullyQualifiedName` — using a fully-qualified name (e.g. `java.util.Map`)
when the class is already imported under its simple name.

# Running tests

## Standard test tasks
Expand Down
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ JDK 21 is required to build. The code targets Java 17 language compatibility.
- Always create PRs as **drafts** (`gh pr create --draft`). Let the human decide when it's
ready for review.
- Never merge branches or PRs without explicit user consent.
- Run style/static-analysis checks locally before pushing (see the `using-gradle` skill's
"Style / static analysis checks" section) — this mirrors CI's `style` job and catches
Checkstyle/PMD/SpotBugs violations before they reach a PR.

## Test Strategy

Expand Down
Loading