Skip to content

Commit 8fe071a

Browse files
fix(deps): update errorproneversion to v2.37.0 (#7211)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jack Berg <[email protected]>
1 parent a7e92df commit 8fe071a

File tree

5 files changed

+43
-44
lines changed

5 files changed

+43
-44
lines changed

buildSrc/src/main/kotlin/otel.errorprone-conventions.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ tasks {
8787
// cognitive load is dubious.
8888
disable("YodaCondition")
8989

90+
// Text blocks are not supported in java 8
91+
disable("StringConcatToTextBlock")
92+
9093
if ((name.contains("Jmh") || name.contains("Test") || project.name.contains("testing-internal")) && !project.name.equals("custom-checks")) {
9194
// Allow underscore in test-type method names
9295
disable("MemberName")

custom-checks/src/test/java/io/opentelemetry/gradle/customchecks/OtelInternalJavadocTest.java

+39-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,48 @@
1111
class OtelInternalJavadocTest {
1212

1313
@Test
14-
void test() {
15-
doTest("internal/InternalJavadocPositiveCases.java");
16-
doTest("internal/InternalJavadocNegativeCases.java");
14+
void positiveCases() {
15+
CompilationTestHelper.newInstance(OtelInternalJavadoc.class, OtelInternalJavadocTest.class)
16+
.addSourceLines(
17+
"internal/InternalJavadocPositiveCases.java",
18+
"/*",
19+
" * Copyright The OpenTelemetry Authors",
20+
" * SPDX-License-Identifier: Apache-2.0",
21+
" */",
22+
"package io.opentelemetry.gradle.customchecks.internal;",
23+
"// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers",
24+
"public class InternalJavadocPositiveCases {",
25+
" // BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers",
26+
" public static class One {}",
27+
" /** Doesn't have the disclaimer. */",
28+
" // BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers",
29+
" public static class Two {}",
30+
"}")
31+
.doTest();
1732
}
1833

19-
private static void doTest(String path) {
34+
@Test
35+
void negativeCases() {
2036
CompilationTestHelper.newInstance(OtelInternalJavadoc.class, OtelInternalJavadocTest.class)
21-
.addSourceFile(path)
37+
.addSourceLines(
38+
"internal/InternalJavadocNegativeCases.java",
39+
"/*",
40+
" * Copyright The OpenTelemetry Authors",
41+
" * SPDX-License-Identifier: Apache-2.0",
42+
" */",
43+
"package io.opentelemetry.gradle.customchecks.internal;",
44+
"/**",
45+
" * This class is internal and is hence not for public use. Its APIs are unstable and can change at",
46+
" * any time.",
47+
" */",
48+
"public class InternalJavadocNegativeCases {",
49+
" /**",
50+
" * This class is internal and is hence not for public use. Its APIs are unstable and can change at",
51+
" * any time.",
52+
" */",
53+
" public static class One {}",
54+
" static class Two {}",
55+
"}")
2256
.doTest();
2357
}
2458
}

custom-checks/src/test/resources/io/opentelemetry/gradle/customchecks/internal/InternalJavadocNegativeCases.java

-21
This file was deleted.

custom-checks/src/test/resources/io/opentelemetry/gradle/customchecks/internal/InternalJavadocPositiveCases.java

-17
This file was deleted.

dependencyManagement/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ val DEPENDENCY_BOMS = listOf(
2828
)
2929

3030
val autoValueVersion = "1.11.0"
31-
val errorProneVersion = "2.36.0"
31+
val errorProneVersion = "2.37.0"
3232
val jmhVersion = "1.37"
3333
// Mockito 5.x.x requires Java 11 https://github.com/mockito/mockito/releases/tag/v5.0.0
3434
val mockitoVersion = "4.11.0"

0 commit comments

Comments
 (0)