Skip to content

Commit a2800c0

Browse files
committed
revert name check changes
1 parent 202f8f7 commit a2800c0

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

buildSrc/src/main/java/org/elasticsearch/test/NamingConventionsCheck.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package org.elasticsearch.test;
2121

22-
import java.io.File;
2322
import java.io.IOException;
2423
import java.lang.reflect.Modifier;
2524
import java.nio.file.FileVisitResult;
@@ -31,7 +30,6 @@
3130
import java.util.HashSet;
3231
import java.util.Objects;
3332
import java.util.Set;
34-
import java.util.regex.Pattern;
3533

3634
/**
3735
* Checks that all tests in a directory are named according to our naming conventions. This is important because tests that do not follow
@@ -49,7 +47,7 @@ public class NamingConventionsCheck {
4947
public static void main(String[] args) throws IOException {
5048
Class<?> testClass = null;
5149
Class<?> integTestClass = null;
52-
String rootPathList = null;
50+
Path rootPath = null;
5351
boolean skipIntegTestsInDisguise = false;
5452
boolean selfTest = false;
5553
boolean checkMainClasses = false;
@@ -72,21 +70,18 @@ public static void main(String[] args) throws IOException {
7270
checkMainClasses = true;
7371
break;
7472
case "--":
75-
rootPathList = args[++i];
73+
rootPath = Paths.get(args[++i]);
7674
break;
7775
default:
7876
fail("unsupported argument '" + arg + "'");
7977
}
8078
}
8179

8280
NamingConventionsCheck check = new NamingConventionsCheck(testClass, integTestClass);
83-
for (String rootDir : rootPathList.split(Pattern.quote(File.pathSeparator))) {
84-
Path rootPath = Paths.get(rootDir);
85-
if (checkMainClasses) {
86-
check.checkMain(rootPath);
87-
} else {
88-
check.checkTests(rootPath, skipIntegTestsInDisguise);
89-
}
81+
if (checkMainClasses) {
82+
check.checkMain(rootPath);
83+
} else {
84+
check.checkTests(rootPath, skipIntegTestsInDisguise);
9085
}
9186

9287
if (selfTest) {

0 commit comments

Comments
 (0)