Skip to content

Commit 2c47399

Browse files
committed
Fix build after suggestions
1 parent 54bae83 commit 2c47399

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

buildSrc/src/main/kotlin/datadog/gradle/plugin/naming/InstrumentationNamingPlugin.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package datadog.gradle.plugin.naming
33
import org.gradle.api.GradleException
44
import org.gradle.api.Plugin
55
import org.gradle.api.Project
6+
import org.gradle.kotlin.dsl.create
67
import java.io.File
78

89
/**
@@ -100,7 +101,7 @@ class InstrumentationNamingPlugin : Plugin<Project> {
100101
if (parentName == null && nestedModules.isEmpty()) {
101102
validateLeafModuleName(moduleName, relativePath, suffixes)?.let { violations.add(it) }
102103
} else if (parentName != null) {
103-
validateModuleName(moduleName, parentName, relativePath, suffixes)?.let { violations.add(it) }
104+
violations.addAll(validateModuleName(moduleName, parentName, relativePath, suffixes))
104105
}
105106
}
106107

@@ -123,7 +124,7 @@ class InstrumentationNamingPlugin : Plugin<Project> {
123124
suffixes: List<String>
124125
): List<NamingViolation> {
125126
// Rule 1: Module name must end with version pattern or one of the configured suffixes
126-
validateVersionOrSuffix(moduleName, relativePath, suffixes)?.let { return it }
127+
validateVersionOrSuffix(moduleName, relativePath, suffixes)?.let { return listOf(it) }
127128

128129
// Rule 2: Module name must contain parent directory name
129130
if (!moduleName.contains(parentName, ignoreCase = true)) {

0 commit comments

Comments
 (0)