File tree Expand file tree Collapse file tree
plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ ktlint {
318318 android = false
319319 outputToConsole = true
320320 outputColorName = "RED"
321- ignoreFailures = true
321+ ignoreFailures = true // ignoring failures also decreases the log level from ERROR to WARN
322322 enableExperimentalRules = true
323323 additionalEditorconfigFile = file("/some/additional/.editorconfig") // not supported with ktlint 0.47+
324324 additionalEditorconfig = [ // not supported until ktlint 0.49
@@ -373,7 +373,7 @@ configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
373373 android.set(false )
374374 outputToConsole.set(true )
375375 outputColorName.set(" RED" )
376- ignoreFailures.set(true )
376+ ignoreFailures.set(true ) // ignoring failures also decreases the log level from ERROR to WARN
377377 enableExperimentalRules.set(true )
378378 additionalEditorconfigFile.set(file(" /some/additional/.editorconfig" )) // not supported with ktlint 0.47+
379379 additionalEditorconfig.set( // not supported until ktlint 0.49
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import org.gradle.api.NamedDomainObjectContainer
55import org.gradle.api.file.ConfigurableFileTree
66import org.gradle.api.file.ProjectLayout
77import org.gradle.api.file.RegularFileProperty
8+ import org.gradle.api.logging.LogLevel
89import org.gradle.api.model.ObjectFactory
910import org.gradle.api.provider.MapProperty
1011import org.gradle.api.provider.Property
@@ -72,7 +73,10 @@ open class KtlintExtension @Inject internal constructor(
7273 /* *
7374 * Whether or not to allow the build to continue if there are warnings;
7475 * defaults to {@code false}, as for any other static code analysis tool.
75- * <p>
76+ *
77+ * When set to `true`, issues are logged with [LogLevel.WARN] so that they're not printed when
78+ * Gradle is invoked with `--quiet`. Otherwise, issues are logged with [LogLevel.ERROR].
79+ *
7680 * Example: `ignoreFailures = true`
7781 */
7882 val ignoreFailures: Property <Boolean > = objectFactory.property { set(false ) }
You can’t perform that action at this time.
0 commit comments