Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Jan 11, 2024
1 parent 4739880 commit 8f765f7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 55 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,14 @@ func getCommands() []cli.Command {
func ConvertEmbeddedPlugin(jfrogApp components.App) (embeddedCmd []cli.Command) {
// Convert commands
if converted, err := components.ConvertCommands(jfrogApp.Name, jfrogApp.Commands); err != nil {
clientlog.Error(fmt.Sprintf("failed adding '%s' embedded plugin as commands. Last error: %w", &jfrogApp.Name, err))
clientlog.Error(fmt.Sprintf("failed adding '%s' embedded plugin as commands. Last error: %s", jfrogApp.Name, err.Error()))
return
} else {
embeddedCmd = append(embeddedCmd, converted...)
}
// Convert subcommands
if subcommands, err := components.ConvertSubcommands(jfrogApp.Subcommands); err != nil {
clientlog.Error(fmt.Sprintf("failed adding '%s' embedded plugin as sub commands. Last error: %w", &jfrogApp.Name, err))
clientlog.Error(fmt.Sprintf("failed adding '%s' embedded plugin as sub commands. Last error: %s", jfrogApp.Name, err.Error()))
return
} else {
for _, subcommand := range subcommands {
Expand Down
6 changes: 0 additions & 6 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ func setupIntegrationTests() {
if *tests.TestPlugins {
InitPluginsTests()
}
if *tests.TestXray {
InitXrayTests()
}
if *tests.TestAccess {
InitAccessTests()
}
Expand All @@ -89,9 +86,6 @@ func tearDownIntegrationTests() {
if *tests.TestNpm || *tests.TestGradle || *tests.TestMaven || *tests.TestGo || *tests.TestNuget || *tests.TestPip || *tests.TestPipenv || *tests.TestDocker || *tests.TestPodman || *tests.TestDockerScan {
CleanBuildToolsTests()
}
if *tests.TestXray {
CleanXrayTests()
}
if *tests.TestDistribution {
CleanDistributionTests()
}
Expand Down
47 changes: 0 additions & 47 deletions utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1325,10 +1325,6 @@ var flagsMap = map[string]cli.Flag{
Name: licenseId,
Usage: "[Mandatory] Xray license ID.` `",
},
Stream: cli.StringFlag{
Name: Stream,
Usage: fmt.Sprintf("[Optional] Xray DBSync V3 stream, Possible values are: %s.` `", offlineupdate.NewValidStreams().GetValidStreamsString()),
},
from: cli.StringFlag{
Name: from,
Usage: "[Optional] From update date in YYYY-MM-DD format.` `",
Expand Down Expand Up @@ -2009,49 +2005,6 @@ var commandFlags = map[string][]string{
lcUrl, user, password, accessToken, serverId, lcDryRun, DistRules, site, city, countryCodes,
InsecureTls, CreateRepo, lcPathMappingPattern, lcPathMappingTarget,
},
// Xray's commands
OfflineUpdate: {
licenseId, from, to, Version, target, Stream, Periodic,
},
XrCurl: {
serverId,
},
CurationAudit: {
curationOutput, workingDirs, curationThreads,
},
Audit: {
xrUrl, user, password, accessToken, serverId, InsecureTls, Project, watches, repoPath, licenses, xrOutput, ExcludeTestDeps,
useWrapperAudit, DepType, RequirementsFile, fail, ExtendedTable, workingDirs, ExclusionsAudit, Mvn, Gradle, Npm, Yarn, Go, Nuget, Pip, Pipenv, Poetry, MinSeverity, FixableOnly, ThirdPartyContextualAnalysis,
},
AuditMvn: {
xrUrl, user, password, accessToken, serverId, InsecureTls, Project, ExclusionsAudit, watches, repoPath, licenses, xrOutput, fail, ExtendedTable, useWrapperAudit,
},
AuditGradle: {
xrUrl, user, password, accessToken, serverId, ExcludeTestDeps, ExclusionsAudit, useWrapperAudit, Project, watches, repoPath, licenses, xrOutput, fail, ExtendedTable,
},
AuditNpm: {
xrUrl, user, password, accessToken, serverId, DepType, Project, ExclusionsAudit, watches, repoPath, licenses, xrOutput, fail, ExtendedTable,
},
AuditGo: {
xrUrl, user, password, accessToken, serverId, Project, ExclusionsAudit, watches, repoPath, licenses, xrOutput, fail, ExtendedTable,
},
AuditPip: {
xrUrl, user, password, accessToken, serverId, RequirementsFile, Project, ExclusionsAudit, watches, repoPath, licenses, xrOutput, fail, ExtendedTable,
},
AuditPipenv: {
xrUrl, user, password, accessToken, serverId, Project, ExclusionsAudit, watches, repoPath, licenses, xrOutput, ExtendedTable,
},
XrScan: {
xrUrl, user, password, accessToken, serverId, specFlag, threads, scanRecursive, scanRegexp, scanAnt,
Project, watches, repoPath, licenses, xrOutput, fail, ExtendedTable, BypassArchiveLimits, MinSeverity, FixableOnly,
},
DockerScan: {
// Flags added here should be also added to Docker command
serverId, Project, watches, repoPath, licenses, xrOutput, fail, ExtendedTable, BypassArchiveLimits, MinSeverity, FixableOnly,
},
BuildScan: {
xrUrl, user, password, accessToken, serverId, Project, vuln, xrOutput, fail, ExtendedTable, rescan,
},
// Mission Control's commands
McConfig: {
mcUrl, mcAccessToken, mcInteractive,
Expand Down

0 comments on commit 8f765f7

Please sign in to comment.