Skip to content

Commit

Permalink
revert name check changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alpar-t committed May 23, 2018
1 parent 202f8f7 commit a2800c0
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.elasticsearch.test;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Modifier;
import java.nio.file.FileVisitResult;
Expand All @@ -31,7 +30,6 @@
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.regex.Pattern;

/**
* Checks that all tests in a directory are named according to our naming conventions. This is important because tests that do not follow
Expand All @@ -49,7 +47,7 @@ public class NamingConventionsCheck {
public static void main(String[] args) throws IOException {
Class<?> testClass = null;
Class<?> integTestClass = null;
String rootPathList = null;
Path rootPath = null;
boolean skipIntegTestsInDisguise = false;
boolean selfTest = false;
boolean checkMainClasses = false;
Expand All @@ -72,21 +70,18 @@ public static void main(String[] args) throws IOException {
checkMainClasses = true;
break;
case "--":
rootPathList = args[++i];
rootPath = Paths.get(args[++i]);
break;
default:
fail("unsupported argument '" + arg + "'");
}
}

NamingConventionsCheck check = new NamingConventionsCheck(testClass, integTestClass);
for (String rootDir : rootPathList.split(Pattern.quote(File.pathSeparator))) {
Path rootPath = Paths.get(rootDir);
if (checkMainClasses) {
check.checkMain(rootPath);
} else {
check.checkTests(rootPath, skipIntegTestsInDisguise);
}
if (checkMainClasses) {
check.checkMain(rootPath);
} else {
check.checkTests(rootPath, skipIntegTestsInDisguise);
}

if (selfTest) {
Expand Down

0 comments on commit a2800c0

Please sign in to comment.