Skip to content

Commit

Permalink
fix static check
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Sep 18, 2023
1 parent 1b30588 commit 16e7d30
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions xray/commands/scan/dockerscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ type DockerScanCommand struct {
dockerFilePath string
scanner *bufio.Scanner
hashToCommandMap map[string]services.DockerfileCommandDetails
commandsMap map[string]string
}

func NewDockerScanCommand() *DockerScanCommand {
Expand Down Expand Up @@ -147,7 +146,7 @@ func (dsc *DockerScanCommand) buildDockerImage() (err error) {
return fmt.Errorf("didn't find Dockerfile in the provided path: %s", dsc.dockerFilePath)
}
if dsc.progress != nil {
dsc.progress.SetHeadlineMsg(fmt.Sprintf("Building Docker image 🏗️"))
dsc.progress.SetHeadlineMsg("Building Docker image 🏗....️")
}
dsc.imageTag = "audittag"
// TODO this could take a while, need to update progress bar.
Expand Down Expand Up @@ -289,8 +288,8 @@ func (dsc *DockerScanCommand) mapDockerfileCommands(dockerCommandsMap map[string
}
// Assign all the unassigned commands to the FROM command before moving on.
if strings.Contains(scannedCommand, fromCommand) {
if firstAppearanceFrom == false {
for key, _ := range dockerCommandsMap {
if !firstAppearanceFrom {
for key := range dockerCommandsMap {
current := dockerCommandsMap[key]
if len(current.Line) == 0 {
current.Line = append(current.Line, strconv.Itoa(fromLineNumber))
Expand Down

0 comments on commit 16e7d30

Please sign in to comment.