Releases: GDQuest/GDScript-formatter
Release list
GDScript formatter 0.22.0
A fast code formatter for GDScript in Godot 4.
Changelog
Added
- Added a profiling option to the benchmark script compatible with the samply profiler
Changed
- Implemented new balanced line wrapping algorithm for long chains of expressions, including operations and boolean expressions
- In chains of properties and method calls, the formatter will now try to preserve chains like a.b.c with long argument lists or nested lambdas. It will favor breaking the arguments in parentheses over breaking the chain into multiple lines
- Specified the definition for continuation lines and changed function calls and other statements and expressions to use a single extra indent instead of two by default
- Always force lambda functions to have a line return after the function declaration, like regular functions
Fixed
- Conditions that exceed max-line-length by only a few columns get backslash + attribute-dot wrapping instead of the parenthesized and-wrap used for larger overflows (#270)
- Fixed --reorder-code detaches trailing comments from top-level declarations and re-attaches them above the following declaration (#271)
- Fix empty lines removed between conditional blocks (#276)
- Fix editorconfig ignored when running from stdin (#275)
- Fix code getting modified/comments getting mangled with operators in multiline chains of binary operator expressions (#278)
- Fix Extra space is added after ! in if statements (#277)
Learn more about the formatter in the GDScript Formatter documentation
GDScript formatter 0.21.0
A fast code formatter for GDScript in Godot 4.
Changelog
Added
- Implement automated line wrapping with a configurable max line length option (#187)
- Add EditorConfig support to share formatting settings across devices or a team (#244)
- Add option to preserve leading indentation within code blocks (#151)
- Add a way to disable the formatter on code regions (Thanks @discordier!)
- Allow configuring the number of blank lines between functions (#249)
- Allow configuring the number of extra indents in continuation lines
- Add support for files using Unicode identifiers (accents, Japanese, Chinese, Hebrew, etc.) (#255)
- Add an option to prefer a single or double quotes for strings (#193)
Changed
- Complete rewrite of the code formatter to make it more robust and much faster too (#250, #72)
- Refactor post-processing to use a visitor pattern with AST edits instead of regex-based processing (#220)
- Remove all
unwrap()calls from the project and follow stricter linting rules (#145) - Remove multiple third-party dependencies and greatly improve compilation speed
- Improve performance by an order of magnitude (10x to over 50x speedup depending on the case)
- Always lay enums vertically (one member per line) (#266)
Fixed
- Fix formatter issue with extra space in front of
class_name(#235) - Fix wrong
@annotationformatting inside an inner class (#245) - Fix
--reorder-codedetaching per-function@warning_ignore(...)from its function in scripts without aclass_name/extendsheader (#242) - Fix wrong region order in inner classes (#247)
- Fix
lint loop-variable-namefor unused variables (#225) - Fix
ifstatement and comment line getting dedented in nested code blocks (#190) - Fix formatting with vs without
--reorder-codenot being idempotent in some situations (#207) - Fix code inside dedented region comments getting dedented too: region comments will now indent into the code (#172)
- Fix dedented comment in a block's body (function body, loop body, if statement body...) causing following lines in the block to be dedented too (#252)
- Preserve up to 1 blank line between consecutive declarations when reordering (#268)
- Godot addon fixes:
Learn more about the formatter in the GDScript Formatter documentation
GDScript formatter 0.21.0-beta
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
GDScript formatter 0.20.1
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
GDScript formatter 0.20.0
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
GDScript formatter 0.19.0
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
GDScript formatter 0.18.2
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
GDScript formatter 0.18.1
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
GDScript formatter 0.18.0
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
GDScript formatter 0.17.0
A fast code formatter for GDScript in Godot 4.
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page: