-
-
Notifications
You must be signed in to change notification settings - Fork 118
Comparing changes
Open a pull request
base repository: mvdan/gofumpt
base: v0.2.1
head repository: mvdan/gofumpt
compare: v0.3.0
- 14 commits
- 14 files changed
- 5 contributors
Commits on Feb 2, 2022
-
force multiline function signatures to separate the body
Even when there is no empty line to begin with. Fixes #73.
Configuration menu - View commit details
-
Copy full SHA for 4a0cea1 - Browse repository at this point
Copy the full SHA 4a0cea1View commit details
Commits on Feb 4, 2022
-
revert removing lines between interface methods
After some user reports, it's evident this rule has some downsides. The advantages are rather slim in comparison. Remove the rule entirely. Fixes #186.
Configuration menu - View commit details
-
Copy full SHA for 6333469 - Browse repository at this point
Copy the full SHA 6333469View commit details -
README: use a simpler interface example
Now that we only strip leading and trailing empty lines, we can simplify the docs and example. For #186.
Configuration menu - View commit details
-
Copy full SHA for f32c372 - Browse repository at this point
Copy the full SHA f32c372View commit details
Commits on Feb 12, 2022
-
fix panic with go1.18 workspaces
When running inside a Go workspace, go list -m returns all modules in the workspace.
Configuration menu - View commit details
-
Copy full SHA for bef63db - Browse repository at this point
Copy the full SHA bef63dbView commit details
Commits on Feb 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9685193 - Browse repository at this point
Copy the full SHA 9685193View commit details
Commits on Feb 20, 2022
-
fully format generated files if given explicitly
Otherwise it's very hard to apply gofumpt rules to generated code. It still makes sense to skip the added rules with "gofumpt -w .", because more often than not code generators only obey gofmt, and it's often unnecessary to force generated code to follow gofumpt. The behavior is similar to how we treat vendor directories, with the difference that we do fully skip vendor directories by default, whereas for generated Go files we still apply gofmt. The difference is that changing vendored files may upset cmd/go, and walking the vendor directory can unnecessarily waste time. While here, tweak the README to better explain these special cases. Fixes #180.
Configuration menu - View commit details
-
Copy full SHA for d74ca43 - Browse repository at this point
Copy the full SHA d74ca43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9827b59 - Browse repository at this point
Copy the full SHA 9827b59View commit details -
document the removal of empty lines surrounding field lists
Our documentation of the rule was actually incorrect. We always applied it to all field lists, not interfaces. And we didn't take comments into account yet, which is what the recent change improved upon. While here, remove unintentional whitespace from the added tests.
Configuration menu - View commit details
-
Copy full SHA for 6b39b9e - Browse repository at this point
Copy the full SHA 6b39b9eView commit details -
Mainly to include the work that Bryan Mills and myself did in gofmt to make it format multiple files concurrently, resulting in a 3-4x speedup on my 8-core laptop. Note that this also includes the later change to limit to 200 concurrently open file descriptors, to avoid "too many open files" errors on some systems. Also note that we reverted gofmt's transition from interface{} to "any", as we still want to support Go 1.16 and 1.17. Update the README to clarify what version of gofmt we're based on. While here, also update generated.txt to test that gofmt still applies to implicitly walked generated files, and that stdin is considered an explicitly given file.
Configuration menu - View commit details
-
Copy full SHA for 99c3b4c - Browse repository at this point
Copy the full SHA 99c3b4cView commit details -
rework multiline func signatures
we were checking the column position but that doesn't work for nested/scoped funcs
Configuration menu - View commit details
-
Copy full SHA for acf11b6 - Browse repository at this point
Copy the full SHA acf11b6View commit details
Commits on Feb 22, 2022
-
format: import paths similar to the module path aren't std
Add the feature, test it, and document it in the README. It's enough to mention it in the FAQ, as I expect that most users will never run into this edge case. And those few that may run into it will hopefully never need to know how it works or why. Note that this adds a new option to pass the info from go.mod, much like LangVersion already did. Fixes #22. Fixes #117. Fixes #120. Fixes #187.
Configuration menu - View commit details
-
Copy full SHA for 487b40b - Browse repository at this point
Copy the full SHA 487b40bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec957d2 - Browse repository at this point
Copy the full SHA ec957d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e676cd6 - Browse repository at this point
Copy the full SHA e676cd6View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 0402b97 - Browse repository at this point
Copy the full SHA 0402b97View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.2.1...v0.3.0