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 <jberg@newrelic.com>
This commit is contained in:
renovate[bot] 2025-04-02 15:33:01 -05:00 committed by GitHub
parent a7e92dfe81
commit 8fe071afee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 43 additions and 44 deletions

View File

@ -87,6 +87,9 @@ tasks {
// cognitive load is dubious. // cognitive load is dubious.
disable("YodaCondition") disable("YodaCondition")
// Text blocks are not supported in java 8
disable("StringConcatToTextBlock")
if ((name.contains("Jmh") || name.contains("Test") || project.name.contains("testing-internal")) && !project.name.equals("custom-checks")) { if ((name.contains("Jmh") || name.contains("Test") || project.name.contains("testing-internal")) && !project.name.equals("custom-checks")) {
// Allow underscore in test-type method names // Allow underscore in test-type method names
disable("MemberName") disable("MemberName")

View File

@ -11,14 +11,48 @@ import org.junit.jupiter.api.Test;
class OtelInternalJavadocTest { class OtelInternalJavadocTest {
@Test @Test
void test() { void positiveCases() {
doTest("internal/InternalJavadocPositiveCases.java"); CompilationTestHelper.newInstance(OtelInternalJavadoc.class, OtelInternalJavadocTest.class)
doTest("internal/InternalJavadocNegativeCases.java"); .addSourceLines(
"internal/InternalJavadocPositiveCases.java",
"/*",
" * Copyright The OpenTelemetry Authors",
" * SPDX-License-Identifier: Apache-2.0",
" */",
"package io.opentelemetry.gradle.customchecks.internal;",
"// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers",
"public class InternalJavadocPositiveCases {",
" // BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers",
" public static class One {}",
" /** Doesn't have the disclaimer. */",
" // BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers",
" public static class Two {}",
"}")
.doTest();
} }
private static void doTest(String path) { @Test
void negativeCases() {
CompilationTestHelper.newInstance(OtelInternalJavadoc.class, OtelInternalJavadocTest.class) CompilationTestHelper.newInstance(OtelInternalJavadoc.class, OtelInternalJavadocTest.class)
.addSourceFile(path) .addSourceLines(
"internal/InternalJavadocNegativeCases.java",
"/*",
" * Copyright The OpenTelemetry Authors",
" * SPDX-License-Identifier: Apache-2.0",
" */",
"package io.opentelemetry.gradle.customchecks.internal;",
"/**",
" * This class is internal and is hence not for public use. Its APIs are unstable and can change at",
" * any time.",
" */",
"public class InternalJavadocNegativeCases {",
" /**",
" * This class is internal and is hence not for public use. Its APIs are unstable and can change at",
" * any time.",
" */",
" public static class One {}",
" static class Two {}",
"}")
.doTest(); .doTest();
} }
} }

View File

@ -1,21 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.gradle.customchecks.internal;
/**
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
* any time.
*/
public class InternalJavadocNegativeCases {
/**
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
* any time.
*/
public static class One {}
static class Two {}
}

View File

@ -1,17 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.gradle.customchecks.internal;
// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers
public class InternalJavadocPositiveCases {
// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers
public static class One {}
/** Doesn't have the disclaimer. */
// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers
public static class Two {}
}

View File

@ -28,7 +28,7 @@ val DEPENDENCY_BOMS = listOf(
) )
val autoValueVersion = "1.11.0" val autoValueVersion = "1.11.0"
val errorProneVersion = "2.36.0" val errorProneVersion = "2.37.0"
val jmhVersion = "1.37" val jmhVersion = "1.37"
// Mockito 5.x.x requires Java 11 https://github.com/mockito/mockito/releases/tag/v5.0.0 // Mockito 5.x.x requires Java 11 https://github.com/mockito/mockito/releases/tag/v5.0.0
val mockitoVersion = "4.11.0" val mockitoVersion = "4.11.0"