android / android/nowinandroid
[Bug]: Current project is not applied ```android_studio``` style ktlint
- Dominant language
- Kotlin
- Stars
- 21.8k
- Forks
- 4.6k
- Avg merge
- 19h 20m
- Merged PRs (30d)
- 2
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is there a StackOverflow question about this issue?
- [X] I have searched StackOverflow
### What happened?
### Current project is not applied ```android_studio``` style ktlint
In ```init.gradle.kts```, there are ```editorconfigOverride``` with ```android to true```, but there are no keyword for ```android = true``` in editorconfig file.
```ktlin
ktlint(ktlintVersion).editorConfigOverride(
mapOf(
"android" to "true",
),
)
```
The [correct usage](https://pinterest.github.io/ktlint/1.2.1/rules/code-styles/) is that write ```ktlint_code_style = android_studio``` in editorconfig.
Current project was applied ```intellij_idea``` style ktlint which [Spotless set this as default](https://github.com/diffplug/spotless/blob/f7346d52882df5b0eb9f8eb7c13aea8ec14c43f6/lib/src/compatKtLint1Dot0Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat1Dot0Dot0Adapter.java#L136) when don't have ```ktlint_code_style```.
```ktlin
if (!editorConfigOverrideMap.containsKey("ktlint_code_style")) {
editorConfigOverrideMap.put("ktlint_code_style", "intellij_idea");
}
```
### Relevant logcat output
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.