I have been trying to find the correct place to pu...
# multiplatform
m
I have been trying to find the correct place to put my
lint.xml
file in my KMM project to allow me to suppress some of the main Lint errors (in particular the Graph generated classes are causing all sorts of issues for me). I see errors like this:
/Users/MWolfson/.../shared/build/generated/sqldelight/code/AppDatabase/commonMain/com/company/eventable/cache/Event.kt:10:1: Lint error > [indent] Unexpected indentation (2) (should be 4)
So I have created a
lint.xml
file with the following:
Copy code
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="indent" severity="ignore"/>
</lint>
and I placed this in the following directory:
/Users/MWolfson/.../shared/lint.xml
BUT this doesn't have any effect?! What am I doing wrong? I have tried all sorts of permutations of values in the ignore file, and also tried to put that file in multiple different locations. Anyone that can help me with this Lint config challenge I would be eternally grateful. Also added this to my
shared\build.gradle.kts:
Copy code
android{
...

lint {
    quiet = false
    abortOnError = true
    lintConfig = file ("./lint.xml")
}
e
you seem to be mixing up different lints. that gradle config is for Android Lint but that error looks to be #ktlint, which is totally separate
m
Great point. Those do look like ktlint errors (by the type of thing they are complaining about, but it does say
Lint error
. This is a great clue though, and thanks...I use this plugin to set this up, so I need to look at what exactly this does:
apply(plugin = "org.jmailen.kotlinter")
Yeah, looks like that plugin does use
ktlint
, and I need to use an .editorconfig file, or a plugin specific config...thanks again.