Skip to content

Commit

Permalink
Made ktlint -F return error code 1 when some of the violations cannot…
Browse files Browse the repository at this point in the history
… be auto-corrected (#162)
  • Loading branch information
shyiko committed Feb 28, 2018
1 parent b0be962 commit bae98f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ktlint/src/main/kotlin/com/github/shyiko/ktlint/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ ${ByteArrayOutputStream().let { this.printUsage(it); it }.toString().trimEnd().s
format(fileName, fileContent, ruleSetProviders.map { it.second.get() }, userData) { err, corrected ->
if (!corrected) {
result.add(LintErrorWithCorrectionInfo(err, corrected))
tripped.set(true)
}
}
} catch (e: Exception) {
Expand Down

0 comments on commit bae98f5

Please # to comment.