question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Non working `ktlint` settings block

See original GitHub issue

Hello, I have added this config to project level build.gradle.kts file

ktlint {
    version.set("0.30.0")
    android.set(true)
    debug.set(true)
    verbose.set(true)
    outputToConsole.set(true)
    reporters.set(setOf(ReporterType.PLAIN, ReporterType.CHECKSTYLE))
}

However, all of the above settings are somehow ignored. After clearing Gradle cache (removed .gradle in the user home directory) plugin still downloads ktlint “0.29.0” instead of “0.30.0” and none of the above options has any effect (no console output, not html report…).

I use 7.0.0, however, I am observing similar behavior in 6.3.1

Any ideas how to debug and fix it?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
igorwojdacommented, Feb 5, 2019

Thanks a lot for help @Tapchicoma

1reaction
JLLeitschuhcommented, Feb 4, 2019

@igorwojda Nice find. Thanks for helping us figure out what was wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ktlint
No configuration required ktlint aims to capture the official Kotlin coding conventions and Android Kotlin Style Guide. · Rule sets ·. · Disable...
Read more >
ktlint not checking kotlin file - Stack Overflow
To begin there is an error in the configuration of your build.gradle file, in the block Ktlint settings, the line where it appears ......
Read more >
platform/external/ktlint - Git at Google
Which means no decisions to make, nothing to argue about and no special files to ... kotlin-gradle-plugin must be applied for configuration below...
Read more >
How to Automatically Fix Your Code Style With Ktlint - YouTube
In this video you'll learn how you can use ktlint to automatically check and format your code to follow all your coding guidelines....
Read more >
Adding ktlint to Your Kotlin Project - goobar
An introduction to formatting Kotlin code with ktlint. ... Output from running ktlintFormat with several non-fixable errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found