Skip to content

Commit 6f57bb3

Browse files
Update buildSrc/src/main/kotlin/datadog/gradle/plugin/naming/InstrumentationNamingPlugin.kt
Co-authored-by: Alexey Kuznetsov <[email protected]>
1 parent 18479e6 commit 6f57bb3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,19 @@ class InstrumentationNamingPlugin : Plugin<Project> {
121121
parentName: String,
122122
relativePath: String,
123123
suffixes: List<String>
124-
): NamingViolation? {
124+
): List<NamingViolation> {
125125
// Rule 1: Module name must end with version pattern or one of the configured suffixes
126126
validateVersionOrSuffix(moduleName, relativePath, suffixes)?.let { return it }
127127

128128
// Rule 2: Module name must contain parent directory name
129129
if (!moduleName.contains(parentName, ignoreCase = true)) {
130-
return NamingViolation(
130+
return listOf(NamingViolation(
131131
relativePath,
132132
"Module name '$moduleName' should contain parent directory name '$parentName'"
133-
)
133+
))
134134
}
135135

136-
return null
136+
return emptyList()
137137
}
138138

139139
/**

0 commit comments

Comments
 (0)