Skip to content

Commit c22bb59

Browse files
fix(deps): update spotless packages to v7 (major) (#13004)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lauri Tulmin <[email protected]>
1 parent ae3f6ac commit c22bb59

File tree

41 files changed

+333
-425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+333
-425
lines changed

benchmark-overhead/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("java")
3-
id("com.diffplug.spotless") version "6.25.0"
3+
id("com.diffplug.spotless") version "7.0.1"
44
}
55

66
spotless {

conventions/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
`kotlin-dsl`
33
// When updating, update below in dependencies too
4-
id("com.diffplug.spotless") version "6.25.0"
4+
id("com.diffplug.spotless") version "7.0.1"
55
}
66

77
spotless {
@@ -54,7 +54,7 @@ dependencies {
5454
implementation("org.apache.maven:maven-aether-provider:3.3.9")
5555

5656
// When updating, update above in plugins too
57-
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
57+
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.1")
5858
implementation("com.google.guava:guava:33.4.0-jre")
5959
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
6060
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.5")

conventions/src/main/kotlin/otel.spotless-conventions.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ spotless {
7676
// also very hard to find out where this happens
7777
"ktlint_standard_wrapping" to "disabled",
7878
// we use variable names like v1_10Deps
79-
"ktlint_standard_property-naming" to "disabled"
79+
"ktlint_standard_property-naming" to "disabled",
80+
// prevent moving comment to next line in latestDepTestLibrary("xxx") { // see xxx module
81+
"ktlint_standard_function-literal" to "disabled"
8082
)
8183
)
8284
}
@@ -97,7 +99,7 @@ if (project == rootProject) {
9799
"**/*.dockerfile",
98100
"**/gradle.properties"
99101
)
100-
indentWithSpaces()
102+
leadingTabsToSpaces()
101103
trimTrailingWhitespace()
102104
endWithNewline()
103105
}

examples/distro/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
}
1313
}
1414
dependencies {
15-
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
15+
classpath "com.diffplug.spotless:spotless-plugin-gradle:7.0.1"
1616
classpath "com.gradleup.shadow:shadow-gradle-plugin:8.3.5"
1717
classpath "io.opentelemetry.instrumentation:gradle-plugins:2.12.0-alpha-SNAPSHOT"
1818
}

examples/extension/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugins {
1111
See https://imperceptiblethoughts.com/shadow/ for more details about Shadow plugin.
1212
*/
1313
id "com.gradleup.shadow" version "8.3.5"
14-
id "com.diffplug.spotless" version "6.25.0"
14+
id "com.diffplug.spotless" version "7.0.1"
1515

1616
id "io.opentelemetry.instrumentation.muzzle-generation" version "2.12.0-alpha-SNAPSHOT"
1717
id "io.opentelemetry.instrumentation.muzzle-check" version "2.12.0-alpha-SNAPSHOT"

instrumentation/finagle-http-23.11/javaagent/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ val scalaMinor = Regex("""^([0-9]+\.[0-9]+)\.?.*$""").find(scalaVersion)!!.run {
2525
minorVersion
2626
}
2727

28-
val scalified = fun(pack: String): String {
29-
return "${pack}_$scalaMinor"
30-
}
28+
val scalified = fun(pack: String): String = "${pack}_$scalaMinor"
3129

3230
dependencies {
3331
bootstrap(project(":instrumentation:executors:bootstrap"))

instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/MetricRegistrar.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void enrollExtractor(
7171
String unit = metricInfo.getUnit();
7272

7373
switch (instrumentType) {
74-
// CHECKSTYLE:OFF
74+
// CHECKSTYLE:OFF
7575
case COUNTER:
7676
{
7777
// CHECKSTYLE:ON
@@ -88,7 +88,7 @@ void enrollExtractor(
8888
}
8989
break;
9090

91-
// CHECKSTYLE:OFF
91+
// CHECKSTYLE:OFF
9292
case UPDOWNCOUNTER:
9393
{
9494
// CHECKSTYLE:ON
@@ -105,7 +105,7 @@ void enrollExtractor(
105105
}
106106
break;
107107

108-
// CHECKSTYLE:OFF
108+
// CHECKSTYLE:OFF
109109
case GAUGE:
110110
{
111111
// CHECKSTYLE:ON
@@ -121,7 +121,7 @@ void enrollExtractor(
121121
logger.log(INFO, "Created Gauge for {0}", metricName);
122122
}
123123
break;
124-
// CHECKSTYLE:OFF
124+
// CHECKSTYLE:OFF
125125
case STATE:
126126
{
127127
// CHECKSTYLE:ON

instrumentation/kotlinx-coroutines/kotlinx-coroutines-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/kotlinxcoroutines/instrumentationannotations/ExpandFramesClassVisitor.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,34 +95,34 @@ private static void copy(Object[] array, int count, List<Object> list) {
9595
@Override
9696
public void visitFrame(int type, int numLocal, Object[] local, int numStack, Object[] stack) {
9797
switch (type) {
98-
// An expanded frame.
98+
// An expanded frame.
9999
case Opcodes.F_NEW:
100-
// A compressed frame with complete frame data.
100+
// A compressed frame with complete frame data.
101101
case Opcodes.F_FULL:
102102
copy(local, numLocal, currentLocals);
103103
copy(stack, numStack, currentStack);
104104
break;
105-
// A compressed frame with exactly the same locals as the previous frame and with an empty
106-
// stack.
105+
// A compressed frame with exactly the same locals as the previous frame and with an empty
106+
// stack.
107107
case Opcodes.F_SAME:
108108
currentStack.clear();
109109
break;
110-
// A compressed frame with exactly the same locals as the previous frame and with a single
111-
// value on the stack.
110+
// A compressed frame with exactly the same locals as the previous frame and with a single
111+
// value on the stack.
112112
case Opcodes.F_SAME1:
113113
currentStack.clear();
114114
currentStack.add(stack[0]);
115115
break;
116-
// A compressed frame where locals are the same as the locals in the previous frame,
117-
// except that additional 1-3 locals are defined, and with an empty stack.
116+
// A compressed frame where locals are the same as the locals in the previous frame,
117+
// except that additional 1-3 locals are defined, and with an empty stack.
118118
case Opcodes.F_APPEND:
119119
currentStack.clear();
120120
for (int i = 0; i < numLocal; i++) {
121121
currentLocals.add(local[i]);
122122
}
123123
break;
124-
// A compressed frame where locals are the same as the locals in the previous frame,
125-
// except that the last 1-3 locals are absent and with an empty stack.
124+
// A compressed frame where locals are the same as the locals in the previous frame,
125+
// except that the last 1-3 locals are absent and with an empty stack.
126126
case Opcodes.F_CHOP:
127127
currentStack.clear();
128128
for (Iterator<Object> iterator =

instrumentation/kotlinx-coroutines/kotlinx-coroutines-1.0/javaagent/src/test/kotlin/io/opentelemetry/javaagent/instrumentation/kotlinxcoroutines/KotlinCoroutinesInstrumentationTest.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,7 @@ class KotlinCoroutinesInstrumentationTest {
461461
tracer.spanBuilder(opName).startSpan().end()
462462
}
463463

464-
private fun <T> runTest(dispatcherWrapper: DispatcherWrapper, block: suspend CoroutineScope.() -> T): T {
465-
return runTest(dispatcherWrapper.dispatcher, block)
466-
}
464+
private fun <T> runTest(dispatcherWrapper: DispatcherWrapper, block: suspend CoroutineScope.() -> T): T = runTest(dispatcherWrapper.dispatcher, block)
467465

468466
private fun <T> runTest(dispatcher: CoroutineDispatcher, block: suspend CoroutineScope.() -> T): T {
469467
val parentSpan = tracer.spanBuilder("parent").startSpan()
@@ -562,9 +560,7 @@ class KotlinCoroutinesInstrumentationTest {
562560
oldState.close()
563561
}
564562

565-
override fun updateThreadContext(context: CoroutineContext): Scope {
566-
return otelContext.makeCurrent()
567-
}
563+
override fun updateThreadContext(context: CoroutineContext): Scope = otelContext.makeCurrent()
568564
}
569565

570566
// regression test for

instrumentation/kotlinx-coroutines/kotlinx-coroutines-flow-1.3/javaagent-kotlin/src/main/kotlin/io/opentelemetry/javaagent/instrumentation/kotlinxcoroutines/flow/FlowUtil.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter
1010
import kotlinx.coroutines.flow.Flow
1111
import kotlinx.coroutines.flow.onCompletion
1212

13-
fun <REQUEST, RESPONSE> onComplete(flow: Flow<*>, instrumenter: Instrumenter<REQUEST, RESPONSE>, context: Context, request: REQUEST & Any): Flow<*> {
14-
return flow.onCompletion { cause: Throwable? ->
15-
instrumenter.end(context, request, null, cause)
16-
}
13+
fun <REQUEST, RESPONSE> onComplete(flow: Flow<*>, instrumenter: Instrumenter<REQUEST, RESPONSE>, context: Context, request: REQUEST & Any): Flow<*> = flow.onCompletion { cause: Throwable? ->
14+
instrumenter.end(context, request, null, cause)
1715
}

0 commit comments

Comments
 (0)