Skip to content

Commit

Permalink
write changelog for v0.3.0
Browse files Browse the repository at this point in the history
While writing it, I also noticed that the second change for #73,
where we now separate ") {" even if there's no empty line,
wasn't documented in the README. It now is.
  • Loading branch information
mvdan committed Feb 22, 2022
1 parent e676cd6 commit 0402b97
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
20 changes: 20 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog

## [0.3.0] - 2022-02-22

This is gofumpt's third major release, based on Go 1.18's gofmt.
The jump from Go 1.17's gofmt should bring a noticeable speed-up,
as the tool can now format many files concurrently.
On an 8-core laptop, formatting a large codebase is 4x as fast.

The following [formatting rules](https://github.com/mvdan/gofumpt#Added-rules) are added:

* Functions should separate `) {` where the indentation helps readability
* Field lists should not have leading or trailing empty lines

The following changes are included as well:

* Generated files are now fully formatted when given as explicit arguments
* Prepare for Go 1.18's module workspaces, which could cause errors
* Import paths sharing a prefix with the current module path are no longer
grouped with standard library imports
* `format.Options` gains a `ModulePath` field per the last bullet point

## [0.2.1] - 2021-12-12

This bugfix release resolves a number of issues:
Expand Down
15 changes: 14 additions & 1 deletion README.md
Expand Up @@ -63,13 +63,19 @@ func foo() {

</details>

Functions using an empty line for readability should use a `) {` line instead
Functions should separate `) {` where the indentation helps readability

<details><summary><i>example</i></summary>

```
func foo(s string,
i int) {
println("bar")
}
// With an empty line it's slightly better, but still not great.
func bar(s string,
i int) {
println("bar")
}
Expand All @@ -81,6 +87,13 @@ func foo(s string,
) {
println("bar")
}
// With an empty line it's slightly better, but still not great.
func bar(s string,
i int,
) {
println("bar")
}
```

</details>
Expand Down

0 comments on commit 0402b97

Please sign in to comment.