filter not working (Kotlin MPP)
See original GitHub issueI have added the plugin to my Kotlin MPP project using this configuration:
ktlint {
debug = true
verbose = true
android = false
outputToConsole = true
outputColorName = "RED"
ignoreFailures = false
enableExperimentalRules = true
disabledRules = ["multiline-if-else"]
reporters {
reporter "plain"
reporter "checkstyle"
}
filter {
exclude("**/generated/**")
}
}
Yet I am getting failures from files under build/generated like this:
Checking <path_to_project>/build/generated/moko/androidMain/src/<classpath>/MR.kt
Resolving .editorconfig files for <path_to_project>/build/generated/moko/androidMain/src/<classpath>/MR.kt file path
<path_to_project>/build/generated/moko/androidMain/src/<classpath>/MR.kt:3:1: Unnecessary import (no-unused-imports)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Filtering collections - Kotlin
To filter collections by negative conditions, use filterNot() . It returns a list of elements for which the predicate yields false .
Read more >Why does chaining .map() and .filter() in Kotlin not work as ...
I am trying to map a list of objects to a list of objects of another type, then filter the list ...
Read more >Common tests can not be launched from gutter in MPP ...
Common tests can not be launched from gutter in MPP Android/iOS project · Go to app/src/test/java/sample/SampleTestsAndroid. · Go to app/src/commonTest/kotlin/ ...
Read more >Filtering a List in Kotlin - Baeldung
In the example above, the filterNot() function returns the two elements from the List of countries for which the predicate yields false.
Read more >Issues · localazy/kotlin-mpp-wininet - GitHub
This project demonstrates how to use the WinInet API in your Kotlin MPP app for simple HTTP communication. - Issues · localazy/kotlin-mpp-wininet.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Tapchicoma Sorry after a while I found the FAQ entry for filtering source outside src/main. It’s working with the mentioned workaround now
If someone is looking for this, a possible solution to filter on mpp projects could look like this: