Java Code Examples for com.martiansoftware.jsap.Switch#setLongFlag()

The following examples show how to use com.martiansoftware.jsap.Switch#setLongFlag() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GitRepositoryLauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgGitRepositoryMode() {
    Switch sw = new Switch("gitRepo");
    sw.setLongFlag("gitrepo");
    sw.setDefault("false");
    sw.setHelp("This mode allows to use Repairnator to analyze bugs present in a Git repository.");
    return sw;
}
 
Example 2
Source File: GitRepositoryLauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgGitRepositoryFirstCommit() {
    Switch sw = new Switch("gitRepositoryFirstCommit");
    sw.setLongFlag("gitrepofirstcommit");
    sw.setDefault("false");
    sw.setHelp("Decides whether to clone the first commit of the specified branch (only in GIT_REPOSITORY mode).");
    return sw;
}
 
Example 3
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgHelp() {
    Switch sw = new Switch("help");
    sw.setShortFlag('h');
    sw.setLongFlag("help");
    sw.setDefault("false");
    return sw;
}
 
Example 4
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgDebug() {
    Switch sw = new Switch("debug");
    sw.setShortFlag('d');
    sw.setLongFlag("debug");
    sw.setDefault("false");
    return sw;
}
 
Example 5
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgNotifyEndProcess() {
    Switch sw = new Switch("notifyEndProcess");
    sw.setLongFlag("notifyEndProcess");
    sw.setDefault("false");
    sw.setHelp("Activate the notification when the process ends.");
    return sw;
}
 
Example 6
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgCreatePR() {
    Switch sw = new Switch("createPR");
    sw.setLongFlag("createPR");
    sw.setDefault("false");
    sw.setHelp("Activate the creation of a Pull Request in case of patch.");
    return sw;
}
 
Example 7
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgCheckstyleMode() {
    Switch sw = new Switch("checkstyle");
    sw.setLongFlag("checkstyle");
    sw.setDefault("false");
    sw.setHelp("This mode allows to use repairnator to analyze build failing because of checkstyle.");
    return sw;
}
 
Example 8
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgBearsMode() {
    Switch sw = new Switch("bears");
    sw.setLongFlag("bears");
    sw.setDefault("false");
    sw.setHelp("This mode allows to use repairnator to analyze pairs of bugs and human-produced patches.");
    return sw;
}
 
Example 9
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgSmtpTLS() {
    Switch sw = new Switch("smtpTLS");
    sw.setLongFlag("smtpTLS");
    sw.setDefault("false");
    sw.setHelp("Decides whether to use TLS for email communication.");
    return sw;
}
 
Example 10
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgCreateOutputDir() {
    Switch sw = new Switch("createOutputDir");
    sw.setLongFlag("createOutputDir");
    sw.setDefault("false");
    sw.setHelp("Create a specific directory for output.");
    return sw;
}
 
Example 11
Source File: LauncherUtils.java    From repairnator with MIT License 5 votes vote down vote up
public static Switch defineArgSkipDelete() {
    Switch sw = new Switch("skipDelete");
    sw.setLongFlag("skipDelete");
    sw.setDefault("false");
    sw.setHelp("Skip the deletion of docker container.");
    return sw;
}
 
Example 12
Source File: CheckBranchLauncher.java    From repairnator with MIT License 4 votes vote down vote up
private JSAP defineArgs() throws JSAPException {
    // Verbose output
    JSAP jsap = new JSAP();

    // -h or --help
    jsap.registerParameter(LauncherUtils.defineArgHelp());
    // -d or --debug
    jsap.registerParameter(LauncherUtils.defineArgDebug());
    // --runId
    jsap.registerParameter(LauncherUtils.defineArgRunId());
    // --bears
    jsap.registerParameter(LauncherUtils.defineArgBearsMode());
    // -i or --input
    jsap.registerParameter(LauncherUtils.defineArgBranchInput());
    // -o or --output
    jsap.registerParameter(LauncherUtils.defineArgOutput(LauncherType.CHECKBRANCHES, "Specify where to put output data"));
    // --notifyEndProcess
    jsap.registerParameter(LauncherUtils.defineArgNotifyEndProcess());
    // --smtpServer
    jsap.registerParameter(LauncherUtils.defineArgSmtpServer());
    //--smtpPort
    jsap.registerParameter(LauncherUtils.defineArgSmtpPort());
    //--smtpTLS
    jsap.registerParameter(LauncherUtils.defineArgSmtpTLS());
    // --smtpUsername
    jsap.registerParameter(LauncherUtils.defineArgSmtpUsername());
    // --smtpPassword
    jsap.registerParameter(LauncherUtils.defineArgSmtpPassword());
    // --notifyto
    jsap.registerParameter(LauncherUtils.defineArgNotifyto());
    // -n or --name
    jsap.registerParameter(LauncherUtils.defineArgDockerImageName());
    // --skipDelete
    jsap.registerParameter(LauncherUtils.defineArgSkipDelete());
    // -t or --threads
    jsap.registerParameter(LauncherUtils.defineArgNbThreads());
    // -g or --globalTimeout
    jsap.registerParameter(LauncherUtils.defineArgGlobalTimeout());

    Switch sw1 = new Switch("humanPatch");
    sw1.setShortFlag('p');
    sw1.setLongFlag("humanPatch");
    sw1.setDefault("false");
    jsap.registerParameter(sw1);

    FlaggedOption opt2 = new FlaggedOption("repository");
    opt2.setShortFlag('r');
    opt2.setLongFlag("repository");
    opt2.setStringParser(JSAP.STRING_PARSER);
    opt2.setRequired(true);
    opt2.setHelp("Specify where to collect branches");
    jsap.registerParameter(opt2);

    return jsap;
}