File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
buildSrc/src/main/kotlin/datadog/gradle/plugin/naming Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import java.io.File
2121 * ```
2222 */
2323class InstrumentationNamingPlugin : Plugin <Project > {
24+ val versionPattern : Regex = Regex (""" \d+\.\d+(\.\d+)?$""" )
25+
2426 override fun apply (target : Project ) {
2527 val extension = target.extensions.create(
2628 " instrumentationNaming" ,
@@ -131,7 +133,6 @@ class InstrumentationNamingPlugin : Plugin<Project> {
131133 relativePath : String
132134 ): NamingViolation ? {
133135 // Rule 1: Module name must end with version pattern (X.Y, X.Y.Z, etc.) or "-common"
134- val versionPattern = Regex (""" \d+\.\d+(\.\d+)?$""" )
135136 val endsWithCommon = moduleName.endsWith(" -common" )
136137 val endsWithVersion = versionPattern.containsMatchIn(moduleName)
137138
@@ -163,7 +164,6 @@ class InstrumentationNamingPlugin : Plugin<Project> {
163164 relativePath : String
164165 ): NamingViolation ? {
165166 // Rule: Module name must end with version pattern (X.Y, X.Y.Z, etc.) or "-common"
166- val versionPattern = Regex (""" \d+\.\d+(\.\d+)?$""" )
167167 val endsWithCommon = moduleName.endsWith(" -common" )
168168 val endsWithVersion = versionPattern.containsMatchIn(moduleName)
169169
You can’t perform that action at this time.
0 commit comments