forked from phoedos/pmd
Cleanup code
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cli;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
@ -29,5 +33,5 @@ abstract class BaseCliTest {
|
||||
});
|
||||
}
|
||||
|
||||
abstract protected List<String> cliStandardArgs();
|
||||
protected abstract List<String> cliStandardArgs();
|
||||
}
|
@ -70,12 +70,12 @@ class CpdCliTest extends BaseCliTest {
|
||||
|
||||
@Test
|
||||
void testEmptyResultRendering() throws Exception {
|
||||
final String stdout = SystemLambda.tapSystemErrAndOut(() -> {
|
||||
final String stdout = SystemLambda.tapSystemOut(() -> {
|
||||
SystemLambda.tapSystemErr(() -> {
|
||||
final int statusCode = SystemLambda.catchSystemExit(() -> {
|
||||
PmdCli.main(new String[] {
|
||||
"cpd", "--minimum-tokens", "340", "--language", "java", "--dir",
|
||||
SRC_DIR, "--format", "xml"
|
||||
SRC_DIR, "--format", "xml",
|
||||
});
|
||||
});
|
||||
assertEquals(ExecutionResult.OK.getExitCode(), statusCode);
|
||||
|
@ -1,3 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cli.commands.internal;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
@ -14,15 +14,15 @@ import java.util.Map.Entry;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.beust.jcommander.JCommander;
|
||||
import com.beust.jcommander.ParameterException;
|
||||
|
||||
import net.sourceforge.pmd.PMD;
|
||||
import net.sourceforge.pmd.PMDVersion;
|
||||
import net.sourceforge.pmd.annotation.InternalApi;
|
||||
import net.sourceforge.pmd.cli.internal.CliMessages;
|
||||
import net.sourceforge.pmd.cpd.CPD.StatusCode;
|
||||
|
||||
import com.beust.jcommander.JCommander;
|
||||
import com.beust.jcommander.ParameterException;
|
||||
|
||||
/**
|
||||
* @deprecated Internal API. Use {@link CPD#runCpd(String...)} or {@link CPD#main(String[])}
|
||||
* in order to execute CPD.
|
||||
|
Reference in New Issue
Block a user