Skip to content

Commit

Permalink
Fix Cr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Or-Geva committed Nov 26, 2023
1 parent ba75b2e commit 7c7a6f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
8 changes: 2 additions & 6 deletions src/main/java/com/jfrog/ide/idea/scan/ScanBinaryExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,7 @@ protected List<JFrogSecurityWarning> execute(ScanConfig.Builder inputFileBuilder
// As it is an internal binary execution, the message should be printed for DEBUG use only.
indicator.setText(String.format("Running %s scan at %s", scanType.toString().toLowerCase(), String.join(" ", inputParams.getRoots())));
String cmd = String.format("%s %s", binaryTargetPath.toString(), join(" ", args));
log.info(String.format("""
Executing JAS scanner
%s
with config:
%s""", cmd, inputParams));
log.info(String.format("Executing JAS scanner %s with config: %s", cmd, inputParams));
CommandExecutor commandExecutor = new CommandExecutor(binaryTargetPath.toString(), createEnvWithCredentials());
CommandResults commandResults = commandExecutor.exeCommand(binaryTargetPath.toFile().getParentFile(), args,
null, new NullLog(), Long.MAX_VALUE, TimeUnit.MINUTES);
Expand All @@ -186,7 +182,7 @@ protected List<JFrogSecurityWarning> execute(ScanConfig.Builder inputFileBuilder
log.info(String.format("Failed to run command: %s", cmd));
switch (commandResults.getExitValue()) {
case USER_NOT_ENTITLED -> {
log.info("User not entitled for advance security scan");
log.debug("User not entitled for advance security scan");
return List.of();
}
case NOT_SUPPORTED -> {
Expand Down
16 changes: 2 additions & 14 deletions src/main/java/com/jfrog/ide/idea/scan/data/ScanConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.jfrog.ide.common.nodes.subentities.SourceCodeScanType;
import lombok.Getter;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

@Getter
@ToString
public class ScanConfig {
@JsonProperty("type")
private SourceCodeScanType scanType;
Expand Down Expand Up @@ -95,20 +97,6 @@ public void setSkippedFolders(List<String> skippedFolders) {
this.skippedFolders = skippedFolders;
}

@Override
public String toString() {
return "ScanConfig{" +
"scanType=" + scanType +
", language='" + language + '\'' +
", roots=" + roots +
", output='" + output + '\'' +
", grepDisable=" + grepDisable +
", cves=" + cves +
", skippedFolders=" + skippedFolders +
", excludedRules=" + excludedRules +
'}';
}

public static class Builder {
private SourceCodeScanType scanType;
private String language;
Expand Down

0 comments on commit 7c7a6f5

Please sign in to comment.