Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Remove checkstyle exit behavior due to hang.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchallen committed Oct 18, 2021
1 parent 1bc452f commit 7ec3433
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "com.github.cs125-illinois"
version = "2021.10.6"
version = "2021.10.8"

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.5.31")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ open class GradeTask : DefaultTask() {
@Suppress("unused")
fun run() {
val config = project.extensions.getByType(GradePolicyExtension::class.java)
val exitManager = ExitManager(config)
// val exitManager = ExitManager(config)
val documentBuilder = DocumentBuilderFactory.newInstance().apply {
isValidating = false
isNamespaceAware = false
Expand All @@ -129,7 +129,6 @@ open class GradeTask : DefaultTask() {
val scoringResults = JsonArray()
var pointsPossible = 0
var pointsEarned = 0
var exitProcessWhenDone = false

// Add custom tags
config.reporting.tags.forEach {
Expand Down Expand Up @@ -246,7 +245,7 @@ open class GradeTask : DefaultTask() {
checkstyleResults.addProperty("explanation", "checkstyle crashed")
// If checkstyle crashed, it leaked the file handle
// Future cleans will crash and fail the build unless we bring down this process
exitProcessWhenDone = true
// exitProcessWhenDone = true
}
checkstyleResults.addProperty("description", "checkstyle")
checkstyleResults.addProperty("pointsEarned", checkstylePoints)
Expand Down Expand Up @@ -330,12 +329,16 @@ open class GradeTask : DefaultTask() {
contributors!!.forEach { contribArray.add(it) }
results.add("contributors", contribArray)
}
if (config.captureOutput) results.addProperty("output", taskOutput)
if (config.captureOutput) {
results.addProperty("output", taskOutput)
}

// Make the JSON report(s)
val resultJson = results.toString()
config.reporting.jsonFile?.writeText(resultJson)
if (config.reporting.printJson) println(resultJson)
if (config.reporting.printJson) {
println(resultJson)
}

// Make the pretty report
if (config.reporting.printPretty.enabled) {
Expand Down Expand Up @@ -399,6 +402,6 @@ open class GradeTask : DefaultTask() {
}

// Exit as desired
exitManager.finished(exitProcessWhenDone)
// exitManager.finished(exitProcessWhenDone)
}
}

0 comments on commit 7ec3433

Please sign in to comment.