Unexpected indendation is reporting non-existent issues (Android project)
See original GitHub issueLint error > src/main/java/com/MyClass.kt:24:9: Unexpected indentation (expected 4, actual 8)
// Class names obfuscated
class MyClass internal constructor(
private val sharedPreferences: SharedPreferences // there are 8 spaces here
) : IMyClass {
The 8 spaces are required for continuation indents by the Android Kotlin Style Guide.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Conflict with Android Studio: Unexpected indentation (x) ...
Observed Behavior. Multiple violations reported by ktlint, even after reformatting the whole project from Android Studio. It seems that ktlint ...
Read more >What should I do with "Unexpected indent" in Python?
The issue I'm describing is caused by the Sublime Text editor. The same issue could be caused by other editors as well. Essentially,...
Read more >How do i resolve the unexpected indent error in python
Whenever you have a situation with code inside of a statement, that inside code must be indented, and must be indented consistently.
Read more >Android Studio 2021.2.1 Closed Issues
Record video: Unexpected error while copying video recording from device: Remote object doesn't exist! Memory. Optimize the slowdown to the app ...
Read more >Blog - Apache Cordova
This patch release fixes some bugs on Android, including an issue with the "backbutton" event reported by some users.
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
@autonomousapps Please take a look at my setup for Kotlin plugin. Pay attention that “use continuation indent” is checked only for: “Method call arguments”, “Chained method calls” and “expression body functions”. @jeremymailen continuation indent for android is still 8, not 4. (source)
@autonomousapps see https://github.com/shyiko/ktlint/pull/134#issuecomment-369021113