Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .evergreen/ssdlc-report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -o errexit

############################################
# Main Program #
############################################
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
source "${RELATIVE_DIR_PATH}/javaConfig.bash"

echo "Creating SSLDC reports"
./gradlew -version
./gradlew -PssdlcReport.enabled=true --continue -x test -x integrationTest -x spotlessApply clean check scalaCheck kotlinCheck testClasses || true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command most likely fails due to SpotBugs findings, because it ignores spotbugs/exclude.xml. To prevent the whole script from failing, we use || true.

echo "SpotBugs created the following SARIF files"
find . -path "*/spotbugs/*.sarif"
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ configure(javaCodeCheckedProjects) {
}

spotbugs {
excludeFilter = new File(configDir, 'spotbugs/exclude.xml')
if (!project.buildingWith('ssdlcReport.enabled')) {
excludeFilter = new File(configDir, 'spotbugs/exclude.xml')
}
}

codenarc {
Expand All @@ -350,6 +352,7 @@ configure(javaCodeCheckedProjects) {
reports {
xml.enabled = project.buildingWith('xmlReports.enabled')
html.enabled = !project.buildingWith('xmlReports.enabled')
sarif.enabled = project.buildingWith('ssdlcReport.enabled')
}
}

Expand Down