|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## [0.2.0] - 2021-11-?? |
| 4 | + |
| 5 | +This is gofumpt's second major release, based on Go 1.17's gofmt. |
| 6 | +The jump from Go 1.15's gofmt should bring a mild speed-up, |
| 7 | +as walking directories with `filepath.WalkDir` uses fewer syscalls. |
| 8 | + |
| 9 | +gofumports is now removed, after being deprecated in [0.1.0]. |
| 10 | +Its main purpose was IDE integration; it is now recommended to use gopls, |
| 11 | +which in turn implements goimports and supports gofumpt natively. |
| 12 | +IDEs which don't integrate with gopls (such as GoLand) implement goimports too, |
| 13 | +so it is safe to use gofumpt as their "format on save" command. |
| 14 | +See the [installation instructions](https://github.com/mvdan/gofumpt#Installation) |
| 15 | +for more details. |
| 16 | + |
| 17 | +The following [formatting rules](https://github.com/mvdan/gofumpt#Added-rules) are added: |
| 18 | + |
| 19 | +* Composite literals should not have leading or trailing empty lines |
| 20 | +* No empty lines following an assignment operator |
| 21 | +* Functions using an empty line for readability should use a `) {` line instead |
| 22 | +* Remove unnecessary empty lines from interfaces |
| 23 | + |
| 24 | +Finally, the following changes are made to the gofumpt tool: |
| 25 | + |
| 26 | +* Initial support for Go 1.18's type parameters is added |
| 27 | +* The `-r` flag is removed in favor of `gofmt -r` |
| 28 | +* The `-s` flag is removed as it is always enabled |
| 29 | +* Vendor directories are skipped unless given as explicit arguments |
| 30 | +* The added rules are not applied to generated Go files |
| 31 | +* The `format` Go API now also applies the `gofmt -s` simplification |
| 32 | +* Add support for `//gofumpt:diagnose` comments |
| 33 | + |
3 | 34 | ## [0.1.1] - 2021-03-11
|
4 | 35 |
|
5 | 36 | This bugfix release backports fixes for a few issues:
|
@@ -31,5 +62,6 @@ those building programs with gofumpt.
|
31 | 62 | Finally, this release adds the `-version` flag, to print the tool's own version.
|
32 | 63 | The flag will work for "master" builds too.
|
33 | 64 |
|
| 65 | +[0.2.0]: https://github.com/mvdan/gofumpt/releases/tag/v0.2.0 |
34 | 66 | [0.1.1]: https://github.com/mvdan/gofumpt/releases/tag/v0.1.1
|
35 | 67 | [0.1.0]: https://github.com/mvdan/gofumpt/releases/tag/v0.1.0
|
0 commit comments