You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.7 KiB
78 lines
2.7 KiB
package com.redhat.pctsec.model.osh; |
|
|
|
import jakarta.inject.Singleton; |
|
import picocli.CommandLine; |
|
import picocli.CommandLine.Option; |
|
import picocli.CommandLine.Parameters; |
|
|
|
|
|
|
|
public class paramMapper { |
|
|
|
@Option(names = {"-p", "--profile"}, description = "list of analyzers to use (see command 'list-\n" + |
|
" analyzers'); use comma as a separator: e.g. \"\n" + |
|
" --analyzer=gcc,clang,cppcheck\"") |
|
private String profile; |
|
|
|
@Option(names = {"-a", "--analyzer"}, description = "list of analyzers to use (see command 'list-\n" + |
|
" analyzers'); use comma as a separator: e.g. \"\n" + |
|
" --analyzer=gcc,clang,cppcheck\"") |
|
private String analyzers; |
|
|
|
@Option(names = {"--tarball-build-script"}, description = "With this option osh-cli accepts path to\n" + |
|
" tarball specified via first argument and then\n" + |
|
" the tarball will be scanned. This option sets\n" + |
|
" command which should build the package,\n" + |
|
" usually this should be just \"make\", in case\n" + |
|
" of packages which doesn't need to be built,\n" + |
|
" just pass \"true\".\n") |
|
private String tarballBuildScript; |
|
|
|
@Option(names = {"--brew-build"}, description = "use a brew build (specified by NVR) instead\n" + |
|
" of a local file") |
|
private String brewBuild; |
|
|
|
@Option(names = {"--email-to"}, description = "Email address for email repots") |
|
private String emailTo; |
|
|
|
@Option(names = {"--comment"}, description = "Comments to add to scan request") |
|
private String comment; |
|
|
|
public paramMapper(){} |
|
|
|
public paramMapper(String params){ |
|
new CommandLine(this).parseArgs(params.split(("\\s+"))); |
|
} |
|
|
|
public String getProfile() { |
|
return profile; |
|
} |
|
|
|
public void setProfile(String profile) { |
|
this.profile = profile; |
|
} |
|
|
|
public String getAnalyzers() { |
|
return analyzers; |
|
} |
|
|
|
public void setAnalyzers(String analyzers) { |
|
this.analyzers = analyzers; |
|
} |
|
|
|
public String getTarballBuildScript() { |
|
return tarballBuildScript; |
|
} |
|
|
|
public void setTarballBuildScript(String tarballBuildScript) { |
|
this.tarballBuildScript = tarballBuildScript; |
|
} |
|
|
|
public String getBrewBuild() { |
|
return brewBuild; |
|
} |
|
|
|
public void setBrewBuild(String brewBuild) { |
|
this.brewBuild = brewBuild; |
|
} |
|
}
|
|
|