Log issues at ERROR level with ignoreFailures = false#1038
Conversation
ERROR level instead of WARNING
|
I think you make a valid point here, but I think the use case is a little more complex. I think it really should log at warn is |
|
@wakingrufus thanks for the input! I've updated the tests and implementation, and rebased. |
ERROR level instead of WARNINGERROR level with ignoreFailures=false
ERROR level with ignoreFailures=falseERROR level with ignoreFailures = false
|
@wakingrufus @JLLeitschuh I don't mean to rush you, but I noticed this PR is somehow missing from https://github.com/JLLeitschuh/ktlint-gradle/pulls (!?) and I figured you may not know it is still open. |
There is a GitHub outage for PRs right now |
|
Wow... That's a first I've seen 😆 |
|
It's just appeared in the list again, perhaps triggered by the new comments? 😄 Anyway, I'm glad it's not invisible anymore. |
|
If we're going to add this functionality, then this should also, probably, be documenting this in the README explaining that setting this flag changes the logged output. Otherwise this feature is basically would basically be undiscoverable without reading the CHANGELOG or looking through old pull requests. Thoughts @wakingrufus? |
|
I went ahead and updated both the |
|
Rebased to run unit tests |
What
The issues causing a build failure are most relevant, even when the user requests a quiet output.
Gradle plugins that print the issues causing a failure at
ERRORlevel include:Android Gradle Plugin (lint)
io.gitlab.arturbosch.detekt
Current ktlint-gradle behavior
Currently, when Gradle is invoked with log level
QUIET, the issues causing a failure are missing from ktlint-gradle's output.Proposed behavior
ktlint-gradle should log issues at
ERRORlevel instead.This PR results in the following output change when Gradle is invoked with
--quiet:The output remains unchanged when any other log level is requested, or when no log level is requested (default).
Reference
https://docs.gradle.org/current/userguide/logging.html#logLevels