mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
JavaScript: Extract auxiliary method.
This commit is contained in:
@@ -285,9 +285,8 @@ public class AutoBuild {
|
||||
excludes.add(toRealPath(folderPath));
|
||||
} catch (InvalidPathException | URISyntaxException | ResourceError e) {
|
||||
Exceptions.ignore(e, "Ignore path and print warning message instead");
|
||||
System.err.println("Ignoring '" + fields[0] + "' classification for " +
|
||||
warn("Ignoring '" + fields[0] + "' classification for " +
|
||||
folder + ", which is not a valid path.");
|
||||
System.err.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -354,8 +353,7 @@ public class AutoBuild {
|
||||
patterns.add(realPath);
|
||||
} catch (ResourceError e) {
|
||||
Exceptions.ignore(e, "Ignore exception and print warning instead.");
|
||||
System.err.println("Skipping path " + path + ", which does not exist.");
|
||||
System.err.flush();
|
||||
warn("Skipping path " + path + ", which does not exist.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -557,8 +555,7 @@ public class AutoBuild {
|
||||
protected void extract(FileExtractor extractor, Path file) throws IOException {
|
||||
File f = file.toFile();
|
||||
if (!f.exists()) {
|
||||
System.err.println("Skipping " + file + ", which does not exist.");
|
||||
System.err.flush();
|
||||
warn("Skipping " + file + ", which does not exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -567,6 +564,11 @@ public class AutoBuild {
|
||||
logEndProcess();
|
||||
}
|
||||
|
||||
private void warn(String msg) {
|
||||
System.err.println(msg);
|
||||
System.err.flush();
|
||||
}
|
||||
|
||||
private void logBeginProcess(String message) {
|
||||
System.out.print(message + "...");
|
||||
System.out.flush();
|
||||
|
||||
Reference in New Issue
Block a user