From db6f118b105558f47a90d2d01caa995ce68d1e57 Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Sun, 17 Dec 2023 22:50:52 -0800 Subject: [PATCH] Add test with fewer braces and infix --- .../test/resources/scala3/FewerBraces.stat | 1794 +++++++++++++++++ .../resources/scala3/FewerBraces_fold.stat | 1552 ++++++++++++++ .../resources/scala3/FewerBraces_keep.stat | 1759 ++++++++++++++++ .../resources/scala3/FewerBraces_unfold.stat | 1768 ++++++++++++++++ 4 files changed, 6873 insertions(+) create mode 100644 scalafmt-tests/src/test/resources/scala3/FewerBraces.stat create mode 100644 scalafmt-tests/src/test/resources/scala3/FewerBraces_fold.stat create mode 100644 scalafmt-tests/src/test/resources/scala3/FewerBraces_keep.stat create mode 100644 scalafmt-tests/src/test/resources/scala3/FewerBraces_unfold.stat diff --git a/scalafmt-tests/src/test/resources/scala3/FewerBraces.stat b/scalafmt-tests/src/test/resources/scala3/FewerBraces.stat new file mode 100644 index 0000000000..56a7b36413 --- /dev/null +++ b/scalafmt-tests/src/test/resources/scala3/FewerBraces.stat @@ -0,0 +1,1794 @@ +indent.significant = 3 +<<< #3720 fewerBraces = never ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +<<< #3720 fewerBraces = never || no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +<<< #3720 fewerBraces = never ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +<<< #3720 fewerBraces = never || selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +<<< #3720 fewerBraces = never ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = never || selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = never ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = never || selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = never ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 + ++ + bar + .sbar1: + argbar + .sbar2 + ++ + baz + .sbaz1: + argbaz + .sbaz2 + ++ + qux +<<< #3720 fewerBraces = never || selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 + || + bar + .sbar1: + argbar + .sbar2 + || + baz + .sbaz1: + argbaz + .sbaz2 + || + qux +<<< #3720 fewerBraces = never ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ bar + .sbar1: + argbar + .sbar2 ++ baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = never || selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || bar + .sbar1: + argbar + .sbar2 || baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = never ++ short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +<<< #3720 fewerBraces = never || short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +<<< #3720 fewerBraces = never ++ short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = never || short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = always ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +<<< #3720 fewerBraces = always || no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +<<< #3720 fewerBraces = always ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +<<< #3720 fewerBraces = always || selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +<<< #3720 fewerBraces = always ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = always || selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = always ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = always || selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = always ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 + ++ + bar + .sbar1: + argbar + .sbar2 + ++ + baz + .sbaz1: + argbaz + .sbaz2 + ++ + qux +<<< #3720 fewerBraces = always || selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 + || + bar + .sbar1: + argbar + .sbar2 + || + baz + .sbaz1: + argbaz + .sbaz2 + || + qux +<<< #3720 fewerBraces = always ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ bar + .sbar1: + argbar + .sbar2 ++ baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = always || selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || bar + .sbar1: + argbar + .sbar2 || baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = always ++ short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +<<< #3720 fewerBraces = always || short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +<<< #3720 fewerBraces = always ++ short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = always || short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 + ++ + bar + .sbar1: + argbar + .sbar2 + ++ + baz + .sbaz1: + argbaz + .sbaz2 + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 + || + bar + .sbar1: + argbar + .sbar2 + || + baz + .sbaz1: + argbaz + .sbaz2 + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ bar + .sbar1: + argbar + .sbar2 ++ baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = beforeSelect || selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || bar + .sbar1: + argbar + .sbar2 || baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +<<< #3720 fewerBraces = beforeSelect || short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +<<< #3720 fewerBraces = beforeSelect ++ short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = beforeSelect || short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux diff --git a/scalafmt-tests/src/test/resources/scala3/FewerBraces_fold.stat b/scalafmt-tests/src/test/resources/scala3/FewerBraces_fold.stat new file mode 100644 index 0000000000..8fc8b6251b --- /dev/null +++ b/scalafmt-tests/src/test/resources/scala3/FewerBraces_fold.stat @@ -0,0 +1,1552 @@ +indent.significant = 3 +newlines.source = fold +<<< #3720 fewerBraces = never ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +object a: + def mtd = foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +object a: + def mtd = foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = never || selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = never ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = never || selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = never ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = never || selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = never ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = never || selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = never ++ short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +object a: + def mtd = foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = never || short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = never ++ short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +object a: + def mtd = foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = never || short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = always ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +object a: + def mtd = foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +object a: + def mtd = foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = always || selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = always ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = always || selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = always ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = always || selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = always ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = always || selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = always ++ short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +object a: + def mtd = foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = always || short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = always ++ short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +object a: + def mtd = foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = always || short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +object a: + def mtd = foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +object a: + def mtd = foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = beforeSelect || selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = beforeSelect || selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +object a: + def mtd = foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = beforeSelect || short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = beforeSelect ++ short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +object a: + def mtd = foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = beforeSelect || short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = foo.bar: + arg + || baz: + arg + || qux diff --git a/scalafmt-tests/src/test/resources/scala3/FewerBraces_keep.stat b/scalafmt-tests/src/test/resources/scala3/FewerBraces_keep.stat new file mode 100644 index 0000000000..d7e88b12bc --- /dev/null +++ b/scalafmt-tests/src/test/resources/scala3/FewerBraces_keep.stat @@ -0,0 +1,1759 @@ +indent.significant = 3 +newlines.source = keep +<<< #3720 fewerBraces = never ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +<<< #3720 fewerBraces = never || no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +<<< #3720 fewerBraces = never ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +<<< #3720 fewerBraces = never || selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +<<< #3720 fewerBraces = never ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = never || selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = never ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = never || selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = never ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = never || selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +<<< #3720 fewerBraces = never || selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +<<< #3720 fewerBraces = never ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = never || selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = never ++ short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +<<< #3720 fewerBraces = never || short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +<<< #3720 fewerBraces = never ++ short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = never || short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = always ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +<<< #3720 fewerBraces = always || no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +<<< #3720 fewerBraces = always ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +<<< #3720 fewerBraces = always || selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +<<< #3720 fewerBraces = always ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = always || selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = always ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = always || selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = always ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = always || selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +<<< #3720 fewerBraces = always || selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +<<< #3720 fewerBraces = always ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = always || selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = always ++ short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +<<< #3720 fewerBraces = always || short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +<<< #3720 fewerBraces = always ++ short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = always || short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = beforeSelect || selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || + qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +<<< #3720 fewerBraces = beforeSelect || short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +<<< #3720 fewerBraces = beforeSelect ++ short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +<<< #3720 fewerBraces = beforeSelect || short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux diff --git a/scalafmt-tests/src/test/resources/scala3/FewerBraces_unfold.stat b/scalafmt-tests/src/test/resources/scala3/FewerBraces_unfold.stat new file mode 100644 index 0000000000..53ace56711 --- /dev/null +++ b/scalafmt-tests/src/test/resources/scala3/FewerBraces_unfold.stat @@ -0,0 +1,1768 @@ +indent.significant = 3 +newlines.source = unfold +<<< #3720 fewerBraces = never ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz ++ qux +<<< #3720 fewerBraces = never || no selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz ++ qux +<<< #3720 fewerBraces = never || no selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ + bar: + argbar + .sbar ++ + baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = never || selects, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || + bar: + argbar + .sbar || + baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = never ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ + bar: + argbar + .sbar ++ + baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = never || selects, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || + bar: + argbar + .sbar || + baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = never ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = never || selects before, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = never || selects before, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = never ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ + bar + .sbar1: + argbar + .sbar2 ++ + baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = never || selects both, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || + bar + .sbar1: + argbar + .sbar2 || + baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = never ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ + bar + .sbar1: + argbar + .sbar2 ++ + baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = never || selects both, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || + bar + .sbar1: + argbar + .sbar2 || + baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = never ++ short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg ++ qux +<<< #3720 fewerBraces = never || short, newlines +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || qux +<<< #3720 fewerBraces = never ++ short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg ++ qux +<<< #3720 fewerBraces = never || short, spaces +indent.significant = 2 +indent.fewerBraces = never +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || qux +<<< #3720 fewerBraces = always ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz ++ qux +<<< #3720 fewerBraces = always || no selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz ++ qux +<<< #3720 fewerBraces = always || no selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ + bar: + argbar + .sbar ++ + baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = always || selects, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || + bar: + argbar + .sbar || + baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = always ++ selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ + bar: + argbar + .sbar ++ + baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = always || selects, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || + bar: + argbar + .sbar || + baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = always ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = always || selects before, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = always || selects before, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = always ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ + bar + .sbar1: + argbar + .sbar2 ++ + baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = always || selects both, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || + bar + .sbar1: + argbar + .sbar2 || + baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = always ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ + bar + .sbar1: + argbar + .sbar2 ++ + baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = always || selects both, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || + bar + .sbar1: + argbar + .sbar2 || + baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = always ++ short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg ++ qux +<<< #3720 fewerBraces = always || short, newlines +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || qux +<<< #3720 fewerBraces = always ++ short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg ++ qux +<<< #3720 fewerBraces = always || short, spaces +indent.significant = 2 +indent.fewerBraces = always +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || no selects, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + ++ bar: + argbar + ++ baz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo: + argfoo + ++ + bar: + argbar + ++ + baz: + argbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || no selects, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + || bar: + argbar + || baz: + argbaz + || qux +>>> +object a: + def mtd = + foo: + argfoo + || + bar: + argbar + || + baz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + ++ + bar: + argbar + .sbar + ++ + baz: + argbaz + .sbaz + ++ + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ + bar: + argbar + .sbar ++ + baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects after, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo + || + bar: + argbar + .sbar + || + baz: + argbaz + .sbaz + || + qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || + bar: + argbar + .sbar || + baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = beforeSelect ++ selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo ++ bar: + argbar + .sbar ++ baz: + argbaz + .sbaz ++ qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo ++ + bar: + argbar + .sbar ++ + baz: + argbaz + .sbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects after, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo: + argfoo + .sfoo || bar: + argbar + .sbar || baz: + argbaz + .sbaz || qux +>>> +object a: + def mtd = + foo: + argfoo + .sfoo || + bar: + argbar + .sbar || + baz: + argbaz + .sbaz || qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects before, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar.sbar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar.sbar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects before, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar.sbar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar.sbar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + ++ + bar.sbar1: + argbar + .sbar2 + ++ + baz.sbaz1: + argbaz + .sbaz2 + ++ + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ + bar + .sbar1: + argbar + .sbar2 ++ + baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = beforeSelect || selects both, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 + || + bar.sbar1: + argbar + .sbar2 + || + baz.sbaz1: + argbaz + .sbaz2 + || + qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || + bar + .sbar1: + argbar + .sbar2 || + baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = beforeSelect ++ selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 ++ bar.sbar1: + argbar + .sbar2 ++ baz.sbaz1: + argbaz + .sbaz2 ++ qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 ++ + bar + .sbar1: + argbar + .sbar2 ++ + baz + .sbaz1: + argbaz + .sbaz2 ++ qux +<<< #3720 fewerBraces = beforeSelect || selects both, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo1: + argfoo + .sfoo2 || bar.sbar1: + argbar + .sbar2 || baz.sbaz1: + argbaz + .sbaz2 || qux +>>> +object a: + def mtd = + foo + .sfoo1: + argfoo + .sfoo2 || + bar + .sbar1: + argbar + .sbar2 || + baz + .sbaz1: + argbaz + .sbaz2 || qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || + qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + ++ bar: + argbar + ++ baz.sbaz: + argbaz + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.sfoo: + argfoo + ++ + bar: + argbar + ++ + baz.sbaz: + argbaz ++ qux +<<< #3720 fewerBraces = beforeSelect || selects mixed, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.sfoo: + argfoo + || bar: + argbar + || baz.sbaz: + argbaz + || qux +>>> +object a: + def mtd = + foo.sfoo: + argfoo + || + bar: + argbar + || + baz.sbaz: + argbaz + || qux +<<< #3720 fewerBraces = beforeSelect ++ short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg + ++ + qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg ++ qux +<<< #3720 fewerBraces = beforeSelect || short, newlines +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || + qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || qux +<<< #3720 fewerBraces = beforeSelect ++ short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + ++ baz: + arg + ++ qux +>>> +Idempotency violated +object a: + def mtd = + foo.bar: + arg + ++ + baz: + arg ++ qux +<<< #3720 fewerBraces = beforeSelect || short, spaces +indent.significant = 2 +indent.fewerBraces = beforeSelect +indentOperator.exemptScope = all +=== +object a: + def mtd = + foo.bar: + arg + || baz: + arg + || qux +>>> +object a: + def mtd = + foo.bar: + arg + || + baz: + arg + || qux