Skip to content
Snippets Groups Projects
Commit f90bce76 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- changed exit code behaviour for validating multiple files

parent e90ce809
No related branches found
No related tags found
No related merge requests found
Pipeline #5569 failed
......@@ -516,6 +516,7 @@ public class XmlFormatValidationPlugin implements FormatValidationPlugin {
System.out.println("Debug : '" + plugin.debug + "'");
System.out.println();
}
boolean atLeastOneFileNotValid = false;
for (String file : args) {
System.out.println("----------------------------------");
System.out.println("Validation of file '" + file + "'");
......@@ -536,13 +537,16 @@ public class XmlFormatValidationPlugin implements FormatValidationPlugin {
System.out.println("\t..........");
}
System.out.println("\tisValid: " + plugin.isValid());
if (! plugin.isValid()) {
atLeastOneFileNotValid = true;
}
}
// exit code
if (plugin.isValid()) {
System.exit(0);
} else {
if (atLeastOneFileNotValid) {
System.exit(1);
} else {
System.exit(0);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment