Added fix for Java interfaces not being indented properly

This commit is contained in:
Daniel Woznicki 2022-02-28 12:09:10 -08:00 committed by Stephan Seitz
parent dcfd6c0637
commit bf2493f5e1
3 changed files with 4 additions and 0 deletions

View file

@ -1,6 +1,7 @@
[ [
(class_body) (class_body)
(enum_body) (enum_body)
(interface_body)
(constructor_declaration) (constructor_declaration)
(constructor_body) (constructor_body)
(block) (block)

View file

@ -0,0 +1,2 @@
public interface Foo {
}

View file

@ -21,5 +21,6 @@ describe("indent Java:", function()
run:new_line("enum.java", { on_line = 2, text = "THING_B,", indent = 2 }) run:new_line("enum.java", { on_line = 2, text = "THING_B,", indent = 2 })
run:new_line("class_with_annotation.java", { on_line = 2, text = "void foo() {}", indent = 2 }) run:new_line("class_with_annotation.java", { on_line = 2, text = "void foo() {}", indent = 2 })
run:new_line("enum_with_annotation.java", { on_line = 2, text = "THING;", indent = 2 }) run:new_line("enum_with_annotation.java", { on_line = 2, text = "THING;", indent = 2 })
run:new_line("interface.java", { on_line = 1, text = "void foo();", indent = 2 })
end) end)
end) end)