Closed fappelman closed 4 years ago
As a workaround I have enabled Insert Final Newline
which restores the missing newline but that should not be the solution.
@fappelman Good catch! Thanks for the great report. I will have a deeper look soon!
Thanks again. Fix released as 1.3.4
Also I release a fix for vknabel/vscode-apple-swift-format@1.0.1, which had the same bug.
I did notice that the other package had the same issue. Thanks for fixing.
I have a simple example file
demo.swift
:It is important to notice that the file does end with a newline:
When I run
swiftformat
using the command line:As you can see
swiftformat
is fine with this demo struct.The next step is then to run this within
VSCode
. I have configured the exact same config file and would expect the same output. It is not, it removes the last line.When I save it I get the following content with
od
:That new line should not be removed.