Skip to content

Commit 11823ad

Browse files
Minor cleanup.
1 parent 50d61b9 commit 11823ad

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

buildSrc/src/main/kotlin/datadog/gradle/plugin/config/ConfigInversionLinter.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ private fun loadConfigFields(
5454

5555
is Map<*, *> -> supportedField.keys as Set<String>
5656

57-
else -> throw IllegalStateException(
58-
"SUPPORTED field must be either Set<String> or Map<String, Any>, but was ${supportedField?.javaClass}",
59-
)
57+
else -> throw IllegalStateException("SUPPORTED field must be either Set<String> or Map<String, Any>, but was ${supportedField?.javaClass}")
6058
}
6159

6260
@Suppress("UNCHECKED_CAST")
@@ -251,7 +249,7 @@ private fun registerCheckConfigStringsTask(
251249
val line = varDecl.range.map { it.begin.line }.orElse(1)
252250
add(
253251
"$fileName:$line -> Config '$rawValue' normalizes to '$normalized' " +
254-
"which is missing from '${extension.jsonFile.get()}'",
252+
"which is missing from '${extension.jsonFile.get()}'"
255253
)
256254
}
257255
}
@@ -263,9 +261,7 @@ private fun registerCheckConfigStringsTask(
263261
if (violations.isNotEmpty()) {
264262
logger.error("\nFound config definitions not in '${extension.jsonFile.get()}':")
265263
violations.forEach { logger.lifecycle(it) }
266-
throw GradleException(
267-
"Undocumented Environment Variables found. Please add the above Environment Variables to '${extension.jsonFile.get()}'.",
268-
)
264+
throw GradleException("Undocumented Environment Variables found. Please add the above Environment Variables to '${extension.jsonFile.get()}'.")
269265
} else {
270266
logger.info("All config strings are present in '${extension.jsonFile.get()}'.")
271267
}

buildSrc/src/main/kotlin/datadog/gradle/plugin/config/SupportedTracerConfigurations.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ constructor(
2424

2525
val jsonFile =
2626
objects.fileProperty().convention(
27-
project.rootProject.layout.projectDirectory
28-
.file("metadata/supported-configurations.json"),
27+
project.rootProject.layout.projectDirectory.file("metadata/supported-configurations.json")
2928
)
3029

3130
val destinationDirectory =
32-
objects.directoryProperty().convention(
33-
layout.buildDirectory
34-
.dir("generated/supportedConfigurations"),
35-
)
31+
objects.directoryProperty().convention(layout.buildDirectory.dir("generated/supportedConfigurations"))
3632
}

buildSrc/src/main/kotlin/datadog/gradle/plugin/muzzle/MuzzlePlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class MuzzlePlugin : Plugin<Project> {
193193
instrumentationProject: Project,
194194
runAfterTask: TaskProvider<MuzzleTask>,
195195
muzzleBootstrap: NamedDomainObjectProvider<Configuration>,
196-
muzzleTooling: NamedDomainObjectProvider<Configuration>,
196+
muzzleTooling: NamedDomainObjectProvider<Configuration>
197197
): TaskProvider<MuzzleTask> {
198198
val muzzleTaskName =
199199
buildString {

buildSrc/src/test/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class TracerVersionIntegrationTest {
4444
"""
4545
4646
// uncommitted change this file,
47-
""".trimIndent(),
47+
""".trimIndent()
4848
)
4949
}
5050
)

0 commit comments

Comments
 (0)