Open xiaoqian0408 opened 2 years ago
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
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