diff --git a/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java b/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java index 868a54a3f4b..85bd2e74f43 100644 --- a/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java +++ b/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java @@ -20,6 +20,7 @@ /** * Enumerates all classes and packages that are annotated with {@link API}. */ +@SuppressWarnings("PMD.SystemPrintln") // main entrypoint used to generate documentation public final class ApiScraper { private static final Logger LOGGER = LoggerFactory.getLogger(ApiScraper.class); @@ -62,18 +63,18 @@ public static void main(String[] args) throws Exception { // Find out what jar it came from and consider that the category String categoryFragment = location.getPath(); - LOGGER.debug("category fragment as path: {}", categoryFragment); + //System.out.println("category fragment as path: " + categoryFragment); int bang = categoryFragment.lastIndexOf("!"); int hyphen = categoryFragment.lastIndexOf("-", bang); int slash = categoryFragment.lastIndexOf("/", hyphen); category = categoryFragment.substring(slash + 1, hyphen); - LOGGER.debug("category fragment pared down: {}", category); + //System.out.println("category fragment pared down: " + category); if (isPackage) { - LOGGER.debug("Jar-based Package: {}, came from {}", apiPackage, location); + //System.out.println("Jar-based Package: " + apiPackage + ", came from " + location); sortedApi.put(category, apiPackage + " (PACKAGE)"); } else { - LOGGER.debug("Jar-based Class: {}, came from {}", apiClass, location); + //System.out.println("Jar-based Class: " + apiClass + ", came from " + location); sortedApi.put(category, apiClass.getName() + (apiClass.isInterface() ? " (INTERFACE)" : " (CLASS)")); } @@ -85,10 +86,10 @@ public static void main(String[] args) throws Exception { category = "terasology engine"; if (isPackage) { - LOGGER.debug("Local Package: {}, came from {}", apiPackage, location); + //System.out.println("Local Package: " + apiPackage + ", came from " + location); sortedApi.put(category, apiPackage + " (PACKAGE)"); } else { - LOGGER.debug("Local Class: {}, came from {}", apiClass, location); + //System.out.println("Local Class: " + apiClass + ", came from " + location); sortedApi.put(category, apiClass.getName() + (apiClass.isInterface() ? " (INTERFACE)" : " (CLASS)")); } @@ -103,13 +104,13 @@ public static void main(String[] args) throws Exception { sortedApi.putAll("external", ExternalApiWhitelist.PACKAGES.stream() .map(packagee -> packagee + " (PACKAGE)").collect(Collectors.toSet())); - LOGGER.info("# Modding API:\n"); + System.out.println("# Modding API:\n"); for (String key : sortedApi.keySet()) { - LOGGER.info("## " + key + "\n"); + System.out.println("## " + key + "\n"); for (String value : sortedApi.get(key)) { - LOGGER.info("* {}", value); + System.out.println("* " + value); } - LOGGER.info(""); + System.out.println(""); } } } diff --git a/engine-tests/src/test/java/org/terasology/documentation/BindingScraper.java b/engine-tests/src/test/java/org/terasology/documentation/BindingScraper.java index 804ab3e61b0..e9b016fee4e 100644 --- a/engine-tests/src/test/java/org/terasology/documentation/BindingScraper.java +++ b/engine-tests/src/test/java/org/terasology/documentation/BindingScraper.java @@ -20,6 +20,7 @@ /** * Enumerates all default key bindings and writes them sorted by ID to the console */ +@SuppressWarnings("PMD.SystemPrintln") // main entrypoint used to generate documentation public final class BindingScraper { private static final Logger LOGGER = LoggerFactory.getLogger(BindingScraper.class); @@ -89,10 +90,10 @@ public static void main(String[] args) throws Exception { } for (InputCategory row : categories.keySet()) { - LOGGER.info("# {}", row.displayName()); + System.out.println("# " + row.displayName()); categories.get(row).stream().filter(entry -> entry != null).forEach(entry -> - LOGGER.info("{}: {}", desc.get(entry), keys.get(entry))); + System.out.println(desc.get(entry) + ": " + keys.get(entry))); } }