From 6f8a78f1e9c4ddab8637ba88e58a2813c7659ae8 Mon Sep 17 00:00:00 2001 From: Matthew Li Date: Fri, 28 Aug 2026 14:45:05 -0700 Subject: [PATCH 1/2] Document method comment style --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 5d71d34db0c..9bd598bbcb7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,6 +59,7 @@ docs/ Developer documentation (see below) - **Formatting**: google-java-format enforced via Spotless. Run `./gradlew spotlessApply` before committing. - **Static imports**: Prefer static imports over class-qualified calls for call-style helpers, in both test (Assertions.assertEquals, Mockito.mock) and production code (Collections.emptyList). Wildcard imports disallowed — see CONTRIBUTING.md. +- **Method documentation**: Document entire methods only with concise Javadoc comments (`/** ... */`), never with `//` or plain `/* ... */` comments. - **Instrumentation layout**: `dd-java-agent/instrumentation/{framework}/{framework}-{minVersion}/` - **Instrumentation pattern**: Type matching → Method matching → Advice class (bytecode advice, not AOP) - **Test frameworks**: Always use JUnit 5 for unit tests. Only use Groovy / Spock tests for instrumentation and smoke tests. From 01d180bf652193db8de660f6c37295c6f289bc18 Mon Sep 17 00:00:00 2001 From: Matthew Li Date: Mon, 31 Aug 2026 08:32:34 -0700 Subject: [PATCH 2/2] docs: use active Javadoc guidance --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 9bd598bbcb7..9aa2409f4e8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,7 +59,7 @@ docs/ Developer documentation (see below) - **Formatting**: google-java-format enforced via Spotless. Run `./gradlew spotlessApply` before committing. - **Static imports**: Prefer static imports over class-qualified calls for call-style helpers, in both test (Assertions.assertEquals, Mockito.mock) and production code (Collections.emptyList). Wildcard imports disallowed — see CONTRIBUTING.md. -- **Method documentation**: Document entire methods only with concise Javadoc comments (`/** ... */`), never with `//` or plain `/* ... */` comments. +- **Documentation**: Use concise Javadoc comments (`/** ... */`) for class, method, and field documentation. - **Instrumentation layout**: `dd-java-agent/instrumentation/{framework}/{framework}-{minVersion}/` - **Instrumentation pattern**: Type matching → Method matching → Advice class (bytecode advice, not AOP) - **Test frameworks**: Always use JUnit 5 for unit tests. Only use Groovy / Spock tests for instrumentation and smoke tests.