fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
31 stars 17 forks source link

Improve completion script #351

Open rsenden opened 1 year ago

rsenden commented 1 year ago

Related to #336, fcli should provide proper completion candidates where applicable. The new CompletionCandidatesTest currently outputs the following options/parameters that may need to be improved to provide proper completion candidates:

INFO: AbstractFortifyCLICommand.GenericOptionsArgGroup::logFile: Should change to File or Path
INFO: OutputOptionsArgGroup::outputFile: Should change to File or Path
INFO: LanguageSetCommand::language: Can we generate list of supported languages?
INFO: AbstractProxyOptions.ProxyTargetHostsArgGroup::includedHosts: Does it make sense to use InetAddress?
INFO: AbstractProxyOptions.ProxyTargetHostsArgGroup::excludedHosts: Does it make sense to use InetAddress?
INFO: AbstractProxyOptions::modules: Can we predefine/have modules enum?
INFO: TrustStoreSetCommand::trustStoreType: Can we predefine/have trustStoreType enum?
INFO: TrustStoreSetCommand::trustStorePath: Should change to File or Path
INFO: FoDAppCreateAppCommand::notifications: Option has no completion candidates
INFO: FoDSastScanSetupCommand::technologyStack: Option has no completion candidates
INFO: FoDSastScanSetupCommand::languageLevel: Option has no completion candidates
INFO: FoDMobileScanStartCommand::timezone: Option has no completion candidates
INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::whileAll: Ideally, each wait-for command should provide appropriate completion candidates
INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::whileAny: Ideally, each wait-for command should provide appropriate completion candidates
INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::untilAll: Ideally, each wait-for command should provide appropriate completion candidates
INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::untilAny: Ideally, each wait-for command should provide appropriate completion candidates
INFO: AbstractRestCallCommand::httpMethod: Can we generate completion candidates/change to enum?
INFO: CommonOptionMixins.OptionalDestinationFile::destination: Should change to File or Path
INFO: SSCArtifactDownloadOptions::destination: Should change to File or Path
INFO: SSCIssueTemplateDownloadCommand::destination: Should change to File or Path
INFO: SSCJobUpdateCommand::priority: Can we provide completion candidates, like specific range of numbers?
INFO: SSCReportTemplateCreateCommand::templatePath: Should change to File or Path
INFO: SSCReportTemplateCreateCommand::answerFile: Should change to File or Path
INFO: SSCReportTemplateDownloadCommand::destination: Should change to File or Path
INFO: SSCSeedBundleUploadCommand::seedBundle: Should change to File or Path
INFO: SSCTokenCreateCommand::type: We can potentially provide list of commonly used token types
INFO: SSCVulnerabilityCountCommand::groupingType: Can we provide list of commonly used grouping types?
INFO: AbstractToolInstallCommand::installDir: Should change to File or Path
INFO: AbstractToolInstallCommand::version: Can we generate completion candidates from tool config file?
INFO: AbstractToolUninstallCommand::version: Can we generate completion candidates from tool config file?
rsenden commented 1 year ago

Fixed most/all options/parameters taking paths. Currently remaining:

    INFO: LanguageSetCommand::language: Can we generate list of supported languages?
    INFO: AbstractProxyOptions.ProxyTargetHostsArgGroup::includedHosts: Does it make sense to use InetAddress?
    INFO: AbstractProxyOptions.ProxyTargetHostsArgGroup::excludedHosts: Does it make sense to use InetAddress?
    INFO: AbstractProxyOptions::modules: Can we predefine/have modules enum?
    INFO: TrustStoreSetCommand::trustStoreType: Can we predefine/have trustStoreType enum?
    INFO: FoDAppCreateAppCommand::notifications: Option has no completion candidates
    INFO: FoDSastScanSetupCommand::technologyStack: Option has no completion candidates
    INFO: FoDSastScanSetupCommand::languageLevel: Option has no completion candidates
    INFO: FoDMobileScanStartCommand::timezone: Option has no completion candidates
    INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::whileAll: Ideally, each wait-for command should provide appropriate completion candidates
    INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::whileAny: Ideally, each wait-for command should provide appropriate completion candidates
    INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::untilAll: Ideally, each wait-for command should provide appropriate completion candidates
    INFO: WaitHelperWaitOptions.WaitHelperWaitOptionsArgGroup::untilAny: Ideally, each wait-for command should provide appropriate completion candidates
    INFO: AbstractRestCallCommand::httpMethod: Can we generate completion candidates/change to enum?
    INFO: AbstractRestCallCommand.TransformArgGroup::transformExpression: Option has no completion candidates
    INFO: SSCJobUpdateCommand::priority: Can we provide completion candidates, like specific range of numbers?
    INFO: SSCTokenCreateCommand::type: We can potentially provide list of commonly used token types
    INFO: SSCVulnerabilityCountCommand::groupingType: Can we provide list of commonly used grouping types?
    INFO: AbstractToolInstallCommand::version: Can we generate completion candidates from tool config file?
    INFO: AbstractToolUninstallCommand::version: Can we generate completion candidates from tool config file?