Hello, I have a question. What is editorconfigOver...
# ktlint
j
Hello, I have a question. What is editorconfigOverride "android" to "true"? While I am using Ktlint with Spotless, sometimes I see this gradle configuration. What is the meaning of "android" to "true"? I can't see any documentation but developers use this map. What is this? Is there any documentation?
Copy code
ktlint(ktlintVersion).editorConfigOverride(
                    mapOf(
                        "android" to "true",
                    ),
                )
I also asked this at Spotless, but they says It is relative with Ktlint so that I am here.
1
which is deprecated, see newer docs
j
Thank you, This is what I've searched documentation.
Wait, I wonder editorConfig is working as command line's flag? My code use editorConfigOverride to override editorconfig, but your link shows command line's flag, so I'm not sure both of them is same.
w
that question should go back to spotless, how it translates its config to the actual ktlint call. in ktlint-gradle, we have the "android" flag as a separate extension property from "additionalEditorconfig"
e
there's a new editorconfig field now, so regardless of how
"android"
is handled, https://pinterest.github.io/ktlint/latest/rules/code-styles/
w
but thats
ktlint_code_style = android_studio
not
android = true
though right?
honestly, i dont really know what android = true does
e
that's what you should use now
w
ah ok
ill deprecated the old one in ktlint-gradle extension
j
Is there any documentation relative with old
"android"
editconfig field, not as flag?
p
In very old versions of ktlint cli the 'android' parameter was supported. I think it was also supported in '.editorconfig'. But as said by others it is not used anymore. The ktlint documentation is versioned so checkout the older versions. If it is not the oldest version, please see ktlint release notes.
j
Okay, I got it. Thank you for answering @ephemient, @wakingrufus, @Paul Dingemans