From 7cdb6cfc2b96e942dcfe2352c6b8ed1316aabc4a Mon Sep 17 00:00:00 2001 From: chavacava Date: Mon, 22 Sep 2025 11:06:21 +0200 Subject: [PATCH] add test with complex condition --- testdata/unnecessary_conditional.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testdata/unnecessary_conditional.go b/testdata/unnecessary_conditional.go index 4183867..3b1ada7 100644 --- a/testdata/unnecessary_conditional.go +++ b/testdata/unnecessary_conditional.go @@ -130,6 +130,12 @@ func unnecessaryConditional() bool { id = true } + if (something > 0) && (!id) || (something+10 <= 0) { // MATCH /replace this conditional by: id = !((something > 0) && (!id) || (something+10 <= 0))/ + id = false + } else { + id = true + } + // conditionals with initialization if cond := false; cond { return true