Skip to content
Snippets Groups Projects
Commit 239617ad authored by Jesper's avatar Jesper
Browse files

Skip output generation if nothing is analyzed

parent 1908d1c9
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,12 @@ public class RagDocBuilder extends Frontend { ...@@ -80,6 +80,12 @@ public class RagDocBuilder extends Frontend {
System.out.println("Analyzing source tree..."); System.out.println("Analyzing source tree...");
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
int result = super.run(args, reader, parser); int result = super.run(args, reader, parser);
if (program.options().hasOption("-version")
|| program.options().hasOption("-help")
|| program.options().files().isEmpty()) {
// Nothing was analyzed.
return result;
}
long time = System.currentTimeMillis() - start; long time = System.currentTimeMillis() - start;
System.out.format("Analysis took %.1fs.%n", time / 1000.0); System.out.format("Analysis took %.1fs.%n", time / 1000.0);
try { try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment