You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classExample {
funfoo() {
if (condition1)
if (condition2)
bar()
}
}
Expected behavior
All ifs should get surrounded with braces.
Observed behavior
java.lang.NullPointerException
at org.jetbrains.kotlin.com.intellij.psi.impl.source.codeStyle.CodeEditUtil.saveWhitespacesInfo (CodeEditUtil.java:122)
at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.ChangeUtil.saveIndentationToCopy (ChangeUtil.java:106)
at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.ChangeUtil.copyLeafWithText (ChangeUtil.java:82)
at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.LeafElement.replaceWithText (LeafElement.java:154)
at org.cqfn.diktat.ruleset.rules.BlockStructureBraces$checkOpenBraceOnSameLine$1.invoke (BlockStructureBraces.kt:181)
at org.cqfn.diktat.ruleset.rules.BlockStructureBraces$checkOpenBraceOnSameLine$1.invoke (BlockStructureBraces.kt:53)
Environment information
diktat version: 0.1.3
build tool (maven/gradle): maven
how is diktat run (CLI, plugin, etc.): plugin
kotlin version: 1.4.10
The text was updated successfully, but these errors were encountered:
Describe the bug
Expected behavior
All
if
s should get surrounded with braces.Observed behavior
Environment information
The text was updated successfully, but these errors were encountered: