[cli] Don't show PMD banner+version for every command

Only when calling "--version"
This commit is contained in:
Andreas Dangel 2024-03-05 19:42:35 +01:00
parent 079a13ec4b
commit 754400ef2c
No known key found for this signature in database
GPG Key ID: 93450DF2DF9A3FA3

View File

@ -5,11 +5,8 @@
package net.sourceforge.pmd.cli.commands.internal; package net.sourceforge.pmd.cli.commands.internal;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.stream.Collectors;
import net.sourceforge.pmd.PMDVersion;
import net.sourceforge.pmd.cli.internal.CliExitCode; import net.sourceforge.pmd.cli.internal.CliExitCode;
import net.sourceforge.pmd.cli.internal.PmdBanner;
import picocli.CommandLine.Model.CommandSpec; import picocli.CommandLine.Model.CommandSpec;
import picocli.CommandLine.Option; import picocli.CommandLine.Option;
@ -29,8 +26,6 @@ public abstract class AbstractPmdSubcommand implements Callable<Integer> {
@Override @Override
public final Integer call() throws Exception { public final Integer call() throws Exception {
System.err.println(PmdBanner.loadBanner().stream().collect(Collectors.joining(System.lineSeparator())));
System.err.println(PMDVersion.getFullVersionName());
validate(); validate();
return execute().getExitCode(); return execute().getExitCode();
} }