Skip to content

Commit

Permalink
fixing linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagobcx committed Nov 28, 2023
1 parent 1a05d88 commit 03b1b1a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/commands/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ func exportGlSastResults(targetFile string, results *wrappers.ScanResultsCollect
if err != nil {
return errors.Wrapf(err, "%s: failed to add scan to gl sast report", failedListingResults)
}
convertCxResultToGlVulnerability(results, glSast,summary)
convertCxResultToGlVulnerability(results, glSast, summary)
resultsJSON, err := json.Marshal(glSast)
if err != nil {
return errors.Wrapf(err, "%s: failed to serialize gl sast report ", failedListingResults)
Expand Down Expand Up @@ -1251,15 +1251,15 @@ func convertCxResultsToSarif(results *wrappers.ScanResultsCollection) *wrappers.
return sarif
}

func convertCxResultToGlVulnerability(results *wrappers.ScanResultsCollection, glSast *wrappers.GlSastResultsCollection,summary *wrappers.ResultSummary) {
func convertCxResultToGlVulnerability(results *wrappers.ScanResultsCollection, glSast *wrappers.GlSastResultsCollection, summary *wrappers.ResultSummary) {
for _, result := range results.Results {
if strings.TrimSpace(result.Type) == commonParams.SastType {
glSast = parseGlSastVulnerability(result, glSast,summary)
glSast = parseGlSastVulnerability(result, glSast, summary)
}
}
}

func parseGlSastVulnerability(result *wrappers.ScanResult, glSast *wrappers.GlSastResultsCollection,summary *wrappers.ResultSummary) *wrappers.GlSastResultsCollection {
func parseGlSastVulnerability(result *wrappers.ScanResult, glSast *wrappers.GlSastResultsCollection, summary *wrappers.ResultSummary) *wrappers.GlSastResultsCollection {
queryName := result.ScanResultData.QueryName
fileName := result.ScanResultData.Nodes[0].FileName
lineNumber := strconv.FormatUint(uint64(result.ScanResultData.Nodes[0].Line), 10)
Expand Down Expand Up @@ -1288,13 +1288,13 @@ func parseGlSastVulnerability(result *wrappers.ScanResult, glSast *wrappers.GlSa
{
Type: "similarityId",
Name: "Similarity Id ",
URL: summary.BaseURI+"/results/"+summary.ScanID,
URL: summary.BaseURI + "/results/" + summary.ScanID,
Value: result.ID,
},
},
Links: make([]string, 0),
Links: make([]string, 0),
Tracking: wrappers.Tracking{},
Flags: make([]wrappers.Flag, 0),
Flags: make([]wrappers.Flag, 0),
Location: wrappers.Location{
File: fileName,
StartLine: startLine,
Expand Down

0 comments on commit 03b1b1a

Please sign in to comment.