Skip to content

Commit

Permalink
ci(battletest): collect summary output for javascript (#552)
Browse files Browse the repository at this point in the history
* ci(battletest): collect summary output for javascript

* feat(summary): allow js output
  • Loading branch information
gotbadger authored Feb 10, 2023
1 parent b4de9e4 commit e3e2df0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion battle_tests/metrics_scan/metrics_scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func ScanRepository(repositoryUrl string, language string, reportingChan chan *M
metrics.NumberOfLineOfCode = float64(reportData.NumberOfLines)
metrics.DataTypes = reportData.DataTypes

if language == "ruby" {
if language == "ruby" || language == "javascript" {
// Run a policies scan
policiesOutput, _, err := scanner.Start("summary")
if err != nil {
Expand Down
5 changes: 5 additions & 0 deletions pkg/report/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ func anySupportedLanguagesPresent(inputgocloc *gocloc.Result, config settings.Co
return true, nil
}

_, javascriptPresent := foundLanguages["javascript"]
if javascriptPresent {
return true, nil
}

log.Debug().Msg("No language found for which rules are applicable")
return false, nil
}
Expand Down

0 comments on commit e3e2df0

Please sign in to comment.