Skip to content

Releases: GDQuest/GDScript-formatter

GDScript formatter 0.22.0

Choose a tag to compare

@github-actions github-actions released this 20 Jul 20:41

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

Choose a tag to compare

@github-actions github-actions released this 16 Jul 14:06

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 @annotation formatting inside an inner class (#245)
  • Fix --reorder-code detaching per-function @warning_ignore(...) from its function in scripts without a class_name/extends header (#242)
  • Fix wrong region order in inner classes (#247)
  • Fix lint loop-variable-name for unused variables (#225)
  • Fix if statement and comment line getting dedented in nested code blocks (#190)
  • Fix formatting with vs without --reorder-code not 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:
    • Fix formatter undoes any changes in script if they have not been saved (#243)
    • Fix "Uninstall Formatter" command doesn't exist message (#189)
    • Fix installing the binary formatter on Mac M1 with ARM installs wrong x86 binary (#248)

Learn more about the formatter in the GDScript Formatter documentation

GDScript formatter 0.21.0-beta

Pre-release

Choose a tag to compare

@github-actions github-actions released this 12 Jul 09:39

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:

https://www.gdquest.com/library/gdscript_formatter/

GDScript formatter 0.20.1

Choose a tag to compare

@github-actions github-actions released this 26 May 16:57

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:

https://www.gdquest.com/library/gdscript_formatter/

GDScript formatter 0.20.0

Choose a tag to compare

@github-actions github-actions released this 19 May 22:11

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:

https://www.gdquest.com/library/gdscript_formatter/

GDScript formatter 0.19.0

Choose a tag to compare

@github-actions github-actions released this 11 Apr 13:13

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:

https://www.gdquest.com/library/gdscript_formatter/

GDScript formatter 0.18.2

Choose a tag to compare

@github-actions github-actions released this 17 Dec 09:58

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:

https://www.gdquest.com/library/gdscript_formatter/

GDScript formatter 0.18.1

Choose a tag to compare

@github-actions github-actions released this 17 Dec 09:58

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:

https://www.gdquest.com/library/gdscript_formatter/

GDScript formatter 0.18.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 07:28

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:

https://www.gdquest.com/library/gdscript_formatter/

GDScript formatter 0.17.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 21:49

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:

https://www.gdquest.com/library/gdscript_formatter/