Skip to content

Commit 3b5a62d

Browse files
committed
Make release 0.3.0, update changelog and README
1 parent 8017761 commit 3b5a62d

File tree

4 files changed

+54
-15
lines changed

4 files changed

+54
-15
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
This file documents the changes made to the formatter with each release. This project uses [semantic versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## Release 0.3.0 (2025-09-04)
6+
7+
### Added
8+
9+
- Print the help message if there are no arguments or piped input
10+
11+
### Fixed
12+
13+
- Semicolons: wrap statements on multiple lines when needed, preserve indentation in code blocks
14+
- Inline comments after colons wrapping on another line
15+
16+
### Changed
17+
18+
- Make tests run much 3 to 4x faster and greatly improve output diff
19+
- Use cargo configuration to strip debug symbols from release binaries
20+
521
## Release 0.2.0 (2025-08-23)
622

723
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gdscript-formatter"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
edition = "2021"
55
description = "A GDScript code formatter using Topiary and Tree-sitter"
66
license = "MIT"

README.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The goal of this project is to provide a simple and fast GDScript code formatter
88

99
## Status
1010

11-
**Ready for testing** - 08/19/2024 - The formatter now has many formatting rules implemented and is ready to test. It includes:
11+
Ready for daily use for commonly written code - 09/04/2025 - The formatter now has many formatting rules implemented and is ready to test. It includes:
1212

1313
- **Spaces**: leaving one space consistently between many operators, most keywords, or after commas in function calls, arrays, and dictionaries
1414
- **Multi-line structures**: simple arrays and dictionaries can be wrapped on one or multiple lines with indentation
@@ -17,19 +17,42 @@ The goal of this project is to provide a simple and fast GDScript code formatter
1717

1818
And more!
1919

20-
*In this system, every rule needs to be written explicitly, including putting a space between different keywords, operators, and punctuation. The formatter doesn't automatically add spaces or indentation unless it's explicitly defined in the rules.*
20+
**Please report any issues you find with code snippets!** GDScript has grown into a complex language with many different syntax patterns. While the formatter covers many common cases, there can always be edge cases or less common syntax that may not be handled correctly yet. You can find known issues in the [GitHub issues section](issues).
2121

22-
*So we need you to share any code snippets for things that don't work yet. Also, note that GDScript features in beta/development versions of Godot may not be supported.*
22+
### Formatting on single or multiple lines
2323

24-
**Next steps**:
24+
The formatter's technology doesn't handle maximum line length automatically. Instead, for wrapping code on a single or multiple lines, it uses cues from you, the developer. For example, if you write an array on a single line, it will remain on a single line. This input:
2525

26-
- Gathering feedback from testing and improving the formatter based on real-world needs
26+
```gdscript
27+
var numbers: Array[int] = [1,2,3,4,5]
28+
```
29+
30+
Will be formatted like this:
31+
32+
```gdscript
33+
var numbers: Array[int] = [1, 2, 3, 4, 5]
34+
```
2735

28-
**Technology limitations**:
36+
If you insert a line return, the array will wrap on multiple lines instead. This input:
2937

30-
Topiary doesn't handle maximum line length. Instead, for wrapping code on a single or multiple lines, it uses cues from you: if an array is on a single line, it will remain on a single line, and if it is at least on two lines, Topiary will wrap it on multiple lines.
38+
```gdscript
39+
var dialogue_items: Array[String] = ["I'm learning about Arrays...",
40+
"...and it is a little bit complicated.", "Let's see if I got it right: an array is a list of values!", "Did I get it right? Did I?", "Hehe! Bye bye~!"]
41+
```
42+
43+
Will be formatted like this:
44+
45+
```gdscript
46+
var dialogue_items: Array[String] = [
47+
"I'm learning about Arrays...",
48+
"...and it is a little bit complicated.",
49+
"Let's see if I got it right: an array is a list of values!",
50+
"Did I get it right? Did I?",
51+
"Hehe! Bye bye~!"
52+
]
53+
```
3154

32-
It's always possible to implement a maximum line length as a post-processing step by using Topiary as a library and then running a custom function to wrap lines that are too long. This isn't planned yet, but it is technically possible.
55+
You can insert the line returns anywhere in the array, and the formatter will keep it on multiple lines. The same applies to other structures.
3356

3457
## Contributing
3558

@@ -57,11 +80,11 @@ To add new formatting rules to the GDScript formatter, you can follow these step
5780

5881
Here are the most important directories and files in the project:
5982

60-
- `src/`: Contains the Rust code to compile and run the formatter using the CLI. It's currently a simple wrapper around the Topiary command line program, but later it could use Topiary as a library instead to pack everything into a simple binary
61-
- `tests/`: Contains test files for the formatter. It has input files with unformatted GDScript code and expected output files that the formatter should produce when run on the input files
62-
- `queries/`: Contains the Topiary formatting rules for GDScript. The `gdscript.scm` file is where you define how GDScript code should be formatted based on Tree Sitter queries and Topiary features to mark nodes/patterns for formatting
63-
- `config/`: Contains configuration files for Topiary - basically a small file that tells Topiary how to run the formatter for GDScript
64-
- `docs/`: This folder will compile images and recaps or cheat sheets with some tricks to help when working with tree sitter queries and topiary.
83+
- `src/`: Contains the Rust code to compile and run the formatter using the CLI. It's currently a simple wrapper around the Topiary command line program, but later it could use Topiary as a library instead to pack everything into a simple binary.
84+
- `tests/`: Contains test files for the formatter. It has input files with unformatted GDScript code and expected output files that the formatter should produce when run on the input files.
85+
- `queries/`: Contains the Topiary formatting rules for GDScript. The `gdscript.scm` file is where you define how GDScript code should be formatted based on Tree Sitter queries and Topiary features to mark nodes/patterns for formatting.
86+
- `config/`: Contains configuration files for Topiary - basically a small file that tells Topiary how to run the formatter for GDScript.
87+
- `docs/`: This folder will compile images and recaps or cheat sheets with some tricks to help when working with Tree Sitter queries and Topiary.
6588

6689
## Installing and running the formatter
6790

0 commit comments

Comments
 (0)