diktat
diktat copied to clipboard
Indentation was removed after diktatFix was executed
After diktatFix, indentation was removed from a block of my kotlin code, please see screenshot here

Steps to Reproduce
I just ran ./gradlew clean diktatFix
Environment information
- diktat version: 1.1.0
- build tool (maven/gradle): gradle
- how is diktat run (CLI, plugin, etc.): command line
- kotlin version: 1.6.20
- operating system: Mac and linux
- link to a project (if your project is public):
Any thoughts here?
Hi @xiaoqian0408, thanks for your report! Unfortunately, I'm not able to reproduce this error with the code you've provided. Could you please check if the error can be reproduced on https://ktlint-demo.herokuapp.com and share the reproducer?
Also, looking at how start = if (icon == null) 12.dp else 16.dp statement has been fixed, I suspect that you may be using an older version of diktat, because after https://github.com/saveourtool/diktat/commit/e8b4a51183ed2814eaeca8c764dd54a203c6f3cb we don't wrap single statements in run anymore, even though it was the case before version 1.1.0.
Please upgrade to latest version of diktat: 2.0.0