Closed limbonaut closed 3 months ago
Wow, my last change to the empty line deletion code caused a TON of problems. I might have to just revert it and not have context-sensitive behavior.
Every case mentioned here should be fixed in #672, except typed array args when dense==true.
Godot version
4.2.2-stable
VS Code version
1.89.1
Godot Tools VS Code extension version
1ff626ba4797b3ca38a7d3c9c8f923056a65e9cd
System information
Manjaro Linux
Issue description
Note: Severity stated in parentheses, my own opinion. Some of these issues are probably connected or the same.
Issue: Comment header disappears (CRITICAL)
All comment lines before
extends Node
disappear on format. It's a common practice to include licensing info at the top of the file.Issue: Two lines separation after
extends X | class_name
is not respected (TRIVIAL)According to the style guide example, it's two blank lines after class doc. However, it's not mentioned in the guide's text anywhere, so feel free to ignore this.
Issue: Blank lines are removed between commented out functions (MAJOR)
↓↓↓↓↓
Issue:
#endregion
gets collapsed into function body (MINOR)↓↓↓↓↓
Issue: Plus sign & whitespace strangeness (MINOR)
↓↓↓↓↓
Issue: Spaces introduced into String.match() calls (MINOR)
↓↓↓↓↓
Issue: Typed array arguments don't follow density rules (MINOR)
Issue: Blank lines removed in comment blocks inside a function (MINOR)
↓↓↓↓↓
Issue: Comment blocks at the end of file disappear on format (CRITICAL)
Comment lines at the EOF are progressively DELETED on format.
↓↓↓↓↓
Steps to reproduce
GDScript test file: test_formatter_new.zip