Formatter doesn't properly work on opening and closing braces #40240
Labels
Area/Formatting
Team/CompilerFETools
Semantic API, Formatter, Shell
Team/DevTools
Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs )
Type/Bug
Description
As per the Ballerina style guide, the formatter should only follow OTBS style (https://en.wikipedia.org/wiki/Indentation_style#Variant:_1TBS_(OTBS)) for function braces placement.
But the current implementation does not reformat the other styles to the OTBS format
Steps to Reproduce
keep the function braces as follows and format the code. formatter will keep it as it is, without moving the opening brace to the previous line.
![image (3)](https://user-images.githubusercontent.com/29032600/232673603-82221390-099f-4897-9f97-8f552c1fadb7.png)
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Formatter
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: