New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Rule: BracesOnIfStatements
with configurable parameters
#5700
Conversation
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Fixed
Show fixed
Hide fixed
3ee84bc
to
f69c758
Compare
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
...es-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt
Outdated
Show resolved
Hide resolved
Really nice one so far, left some initial thoughts while reading to understand what you did. |
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #5700 +/- ##
===========================================
+ Coverage 0 84.59% +84.59%
- Complexity 0 3768 +3768
===========================================
Files 0 546 +546
Lines 0 12817 +12817
Branches 0 2236 +2236
===========================================
+ Hits 0 10842 +10842
- Misses 0 860 +860
- Partials 0 1115 +1115
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
.../main/kotlin/io/gitlab/arturbosch/detekt/rules/style/optional/MandatoryBracesIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more finishing touches.
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...es-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt
Outdated
Show resolved
Hide resolved
...es-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt
Outdated
Show resolved
Hide resolved
...es-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt
Outdated
Show resolved
Hide resolved
...es-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt
Outdated
Show resolved
Hide resolved
How a rule should be deprecated? |
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
...kt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/StyleGuideProvider.kt
Outdated
Show resolved
Hide resolved
...es-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Show resolved
Hide resolved
Introduce the rule that checks for braces on if statements using specified policy (never|necessary|consistent|always).
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering File being compiled: P:/projects/contrib/github-detekt/detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:49) at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:241) at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:236) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:68) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:55) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:41) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96) at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:43) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.invokeCodegen(JvmIrCodegenFactory.kt:312) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.runCodegen(KotlinToJVMBytecodeCompiler.kt:348) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:123) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:47) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:167) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:53) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:101) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:47) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:485) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:131) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.doCompile(IncrementalCompilerRunner.kt:424) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:360) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.tryCompileIncrementally(IncrementalCompilerRunner.kt:194) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:89) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:625) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:101) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1746) at jdk.internal.reflect.GeneratedMethodAccessor102.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.RuntimeException: Exception while generating code for: FUN name:partially extra braces are flagged visibility:public modality:FINAL <> ($this:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never) returnType:kotlin.collections.List<org.junit.jupiter.api.DynamicNode> annotations: TestFactory $this: VALUE_PARAMETER name:<this> type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun partially extra braces are flagged (): kotlin.collections.List<org.junit.jupiter.api.DynamicNode> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' CALL 'public final fun access$braceTests ($this: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec, singleLine: kotlin.String, multiLine: kotlin.String, test: @[ExtensionFunctionType] @[ContextFunctionTypeParams(count = '1')] kotlin.Function2<io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest>, kotlin.Unit>): kotlin.collections.List<org.junit.jupiter.api.DynamicNode> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec' type=kotlin.collections.List<org.junit.jupiter.api.DynamicNode> origin=null $this: GET_FIELD 'FIELD FIELD_FOR_OUTER_THIS name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec origin=null receiver: GET_FIELD 'FIELD FIELD_FOR_OUTER_THIS name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null singleLine: CONST String type=kotlin.String value="never" multiLine: CONST String type=kotlin.String value="*" test: BLOCK type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null CLASS LAMBDA_IMPL CLASS name:<no name provided> modality:FINAL visibility:public/*package*/ superTypes:[kotlin.jvm.internal.Lambda; kotlin.Function2<io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest>, kotlin.Unit>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> CONSTRUCTOR GENERATED_MEMBER_IN_CALLABLE_REFERENCE visibility:public/*package*/ <> (this$0:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never) returnType:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> [primary] VALUE_PARAMETER BOUND_RECEIVER_PARAMETER name:this$0 index:0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never BLOCK_BODY SET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=kotlin.Unit origin=INITIALIZER_OF_FIELD_FOR_CAPTURED_VALUE receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null value: GET_VAR 'this$0: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.<init>' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (arity: kotlin.Int) declared in kotlin.jvm.internal.Lambda' arity: CONST Int type=kotlin.Int value=2 BLOCK type=kotlin.Unit origin=null FUN name:invoke visibility:public modality:FINAL <> ($this:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>, <this>:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, $this$braceTests:kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest>) returnType:kotlin.Unit overridden: public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2 $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> VALUE_PARAMETER name:<this> index:0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements VALUE_PARAMETER name:$this$braceTests index:1 type:kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> BLOCK_BODY CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() }" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else if (true) println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else if (true) println() else println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else if (true) println() else if (true) println() else println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final] FUN BRIDGE name:invoke visibility:public modality:OPEN <> ($this:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>, p1:kotlin.Any?, p2:kotlin.Any?) returnType:kotlin.Any? $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> VALUE_PARAMETER BRIDGE name:p1 index:0 type:kotlin.Any? VALUE_PARAMETER BRIDGE name:p2 index:1 type:kotlin.Any? EXPRESSION_BODY CALL 'public final fun invoke (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, $this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest>): kotlin.Unit declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>' type=kotlin.Unit origin=BRIDGE_DELEGATION $this: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null <this>: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements GET_VAR 'p1: kotlin.Any? declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Any? origin=null $this$braceTests: TYPE_OP type=kotlin.collections.MutableList<*> origin=IMPLICIT_CAST typeOperand=kotlin.collections.MutableList<*> GET_VAR 'p2: kotlin.Any? declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Any? origin=null CONSTRUCTOR_CALL 'public/*package*/ constructor <init> (this$0: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never) [primary] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null this$0: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:49) at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate$default(FunctionCodegen.kt:41) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethodNode(ClassCodegen.kt:411) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethod(ClassCodegen.kt:428) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:171) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:184) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:184) at org.jetbrains.kotlin.backend.jvm.FileCodegen.lower(JvmPhases.kt:44) at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:120) at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:116) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:65) ... 40 more Caused by: java.lang.RuntimeException: Exception while generating code for: FUN name:invoke visibility:public modality:FINAL <> ($this:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>, <this>:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, $this$braceTests:kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest>) returnType:kotlin.Unit overridden: public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2 $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> VALUE_PARAMETER name:<this> index:0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements VALUE_PARAMETER name:$this$braceTests index:1 type:kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> BLOCK_BODY CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() }" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else if (true) println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else if (true) println() else println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null $this: TYPE_OP type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=IMPLICIT_CAST typeOperand=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:this$0 type:io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never visibility:public/*package*/ [final]' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never origin=null receiver: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided> origin=null $receiver: GET_VAR '$this$braceTests: kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.collections.MutableList<org.junit.jupiter.api.DynamicTest> origin=null <this>: GET_VAR '<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements origin=null code: CONST String type=kotlin.String value="if (true) { println() } else if (true) println() else if (true) println() else println()" locations: BLOCK type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] CALL 'public final fun arrayOfNulls <T> (size: kotlin.Int): kotlin.Array<T of kotlin.arrayOfNulls?> declared in kotlin' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null <T>: kotlin.Pair<kotlin.Int, kotlin.Int> size: CONST Int type=kotlin.Int value=1 CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit [operator] declared in kotlin.Array' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun to <A, B> (that: B of kotlin.TuplesKt.to): kotlin.Pair<A of kotlin.TuplesKt.to, B of kotlin.TuplesKt.to> [infix] declared in kotlin.TuplesKt' type=kotlin.Pair<kotlin.Int, kotlin.Int> origin=null <A>: kotlin.Int <B>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=1 that: CONST Int type=kotlin.Int value=3 GET_VAR 'val tmp0: kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> [val] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never.partially extra braces are flagged.<no name provided>.invoke' type=kotlin.Array<out kotlin.Pair<kotlin.Int, kotlin.Int>> origin=null at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:49) at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate$default(FunctionCodegen.kt:41) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethodNode(ClassCodegen.kt:411) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethod(ClassCodegen.kt:428) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:171) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitClass(ExpressionCodegen.kt:861) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitClass(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.declarations.IrClass.accept(IrClass.kt:64) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitStatementContainer(ExpressionCodegen.kt:457) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitContainerExpression(ExpressionCodegen.kt:470) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitContainerExpression(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.visitors.IrElementVisitor$DefaultImpls.visitBlock(IrElementVisitor.kt:192) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlock(ExpressionCodegen.kt:398) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlock(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.expressions.IrBlock.accept(IrBlock.kt:22) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.gen(ExpressionCodegen.kt:218) at org.jetbrains.kotlin.backend.jvm.codegen.IrCallGenerator.genValueAndPut(IrCallGenerator.kt:50) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall$handleValueParameter(ExpressionCodegen.kt:500) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:514) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.expressions.IrCall.accept(IrCall.kt:25) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitReturn(ExpressionCodegen.kt:908) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitReturn(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.expressions.IrReturn.accept(IrReturn.kt:25) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitStatementContainer(ExpressionCodegen.kt:457) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:461) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.expressions.IrBlockBody.accept(IrBlockBody.kt:24) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.generate(ExpressionCodegen.kt:241) at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.doGenerate(FunctionCodegen.kt:120) at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:45) ... 51 more Caused by: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call: CALL 'private final fun flag (<this>: io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatements, code: kotlin.String, vararg locations: kotlin.Pair<kotlin.Int, kotlin.Int>): kotlin.Unit [inline] declared in io.gitlab.arturbosch.detekt.rules.style.BracesOnIfStatementsSpec.singleLine.=never' type=kotlin.Unit origin=null Method: flag (Lio/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements;Ljava/util/List;Ljava/lang/String;[Lkotlin/Pair;)V: // annotable parameter count: 4 (visible) // annotable parameter count: 4 (invisible) L0 ICONST_0 ISTORE 5 L1 L2 LINENUMBER 173 L2 ALOAD 2 L3 LINENUMBER 174 L3 NEW java/lang/StringBuilder DUP INVOKESPECIAL java/lang/StringBuilder.<init> ()V LDC "flags " INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; ALOAD 4 ASTORE 7 INVOKESTATIC kotlin/jvm/internal/InlineMarker.beforeInlineCall ()V NOP L4 ICONST_0 ISTORE 8 L5 LINENUMBER 327 L5 ALOAD 7 ASTORE 9 NEW java/util/ArrayList DUP ALOAD 7 ARRAYLENGTH INVOKESPECIAL java/util/ArrayList.<init> (I)V CHECKCAST java/util/Collection ASTORE 10 L6 ICONST_0 ISTORE 11 L7 LINENUMBER 328 L7 ICONST_0 ISTORE 12 ALOAD 9 ARRAYLENGTH ISTORE 13 L8 ILOAD 12 ILOAD 13 IF_ICMPGE L9 ALOAD 9 ILOAD 12 AALOAD ASTORE 14 L10 LINENUMBER 329 L10 ALOAD 10 ALOAD 14 CHECKCAST kotlin/Pair ASTORE 15 INVOKESTATIC kotlin/jvm/internal/InlineMarker.beforeInlineCall ()V L11 ICONST_0 ISTORE 16 L12 LINENUMBER 174 L12 NEW io/gitlab/arturbosch/detekt/api/TextLocation DUP ALOAD 15 INVOKEVIRTUAL kotlin/Pair.getFirst ()Ljava/lang/Object; CHECKCAST java/lang/Number INVOKEVIRTUAL java/lang/Number.intValue ()I ALOAD 15 INVOKEVIRTUAL kotlin/Pair.getSecond ()Ljava/lang/Object; CHECKCAST java/lang/Number INVOKEVIRTUAL java/lang/Number.intValue ()I INVOKESPECIAL io/gitlab/arturbosch/detekt/api/TextLocation.<init> (II)V NOP GOTO L13 L14 L15 L13 INVOKESTATIC kotlin/jvm/internal/InlineMarker.afterInlineCall ()V L16 LINENUMBER 329 L16 INVOKEINTERFACE java/util/Collection.add (Ljava/lang/Object;)Z (itf) POP L17 LINENUMBER 328 L17 IINC 12 1 GOTO L8 L9 LINENUMBER 330 L9 ALOAD 10 L18 CHECKCAST java/util/List L19 LINENUMBER 327 L19 NOP GOTO L20 L21 L22 L20 INVOKESTATIC kotlin/jvm/internal/InlineMarker.afterInlineCall ()V L23 LINENUMBER 174 L23 INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/Object;)Ljava/lang/StringBuilder; LDC " in `" INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; ALOAD 3 INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; BIPUSH 96 INVOKEVIRTUAL java/lang/StringBuilder.append (C)Ljava/lang/StringBuilder; INVOKEVIRTUAL java/lang/StringBuilder.toString ()Ljava/lang/String; NEW io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec$singleLine$=never$flag$2 DUP ALOAD 0 GETFIELD io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec$singleLine$=never.this$0 : Lio/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec$singleLine; GETFIELD io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec$singleLine.this$0 : Lio/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec; ALOAD 1 ALOAD 3 ALOAD 4 INVOKESPECIAL io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec$singleLine$=never$flag$2.<init> (Lio/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec;Lio/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements;Ljava/lang/String;[Lkotlin/Pair;)V CHECKCAST org/junit/jupiter/api/function/Executable INVOKESTATIC org/junit/jupiter/api/DynamicTest.dynamicTest (Ljava/lang/String;Lorg/junit/jupiter/api/function/Executable;)Lorg/junit/jupiter/api/DynamicTest; ASTORE 6 L24 ALOAD 6 LDC "class BracesOnIfStatemen\u2026 listOf(option)\n}" INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue (Ljava/lang/Object;Ljava/lang/String;)V ALOAD 6 L25 L26 LINENUMBER 173 L26 INVOKEINTERFACE java/util/List.add (Ljava/lang/Object;)Z (itf) POP L27 LINENUMBER 181 L27 RETURN L28 LOCALVARIABLE $i$a$-map-BracesOnIfStatementsSpec$singleLine$=never$flag$1 I L12 L15 16 LOCALVARIABLE it Lkotlin/Pair; L11 L15 15 LOCALVARIABLE item$iv$iv Ljava/lang/Object; L10 L17 14 LOCALVARIABLE $i$f$mapTo I L7 L18 11 LOCALVARIABLE $this$mapTo$iv$iv [Ljava/lang/Object; L6 L18 9 LOCALVARIABLE destination$iv$iv Ljava/util/Collection; L6 L18 10 LOCALVARIABLE $i$f$map I L5 L22 8 LOCALVARIABLE $this$map$iv [Ljava/lang/Object; L4 L22 7 LOCALVARIABLE $i$f$flag I L1 L28 5 LOCALVARIABLE this Lio/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec$singleLine$=never; L0 L28 0 LOCALVARIABLE $this$flag Ljava/util/List; L0 L28 2 LOCALVARIABLE <this> Lio/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements; L0 L28 1 LOCALVARIABLE code Ljava/lang/String; L0 L28 3 LOCALVARIABLE locations [Lkotlin/Pair; L0 L28 4 MAXSTACK = 8 MAXLOCALS = 17 File is unknown The root cause java.lang.NullPointerException was thrown at: org.jetbrains.kotlin.codegen.inline.Parameters.getDeclarationSlot(Parameters.kt:57) at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:63) at org.jetbrains.kotlin.backend.jvm.codegen.IrInlineCodegen.genInlineCall(IrInlineCodegen.kt:163) at org.jetbrains.kotlin.backend.jvm.codegen.IrInlineCallGenerator.genCall(IrInlineCallGenerator.kt:31) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:522) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.expressions.IrCall.accept(IrCall.kt:25) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitStatementContainer(ExpressionCodegen.kt:457) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:461) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:135) at org.jetbrains.kotlin.ir.expressions.Ir…
...es-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatementsSpec.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Outdated
Show resolved
Hide resolved
…/rules/style/BracesOnIfStatements.kt Co-authored-by: Róbert Papp <papp.robert.s@gmail.com>
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Fixed
Show fixed
Hide fixed
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Fixed
Show fixed
Hide fixed
...-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/BracesOnIfStatements.kt
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, many iterations and refactors, I hope it's bulletproof by now.
@BraisGabin can you please have a look at the deprecation stuff, I'm unsure if that's correct or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for this awesome contribution!
BracesOnIfStatements
with configurable parameters
[WIP]
To close #5133 one day.
As proposed by @TWiStErRob and @BraisGabin here
BracesOnIfStatements
rule was added as the first iteration.It also may fix #5322 as it does exactly the same except for configurable parameters (
always|never|consistent|necessary
).Please comment.