8000 Comparing v0.2.1...v0.3.0 · mvdan/gofumpt · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or 10000 learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mvdan/gofumpt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.1
Choose a base ref
...
head repository: mvdan/gofumpt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.3.0
Choose a head ref
  • 14 commits
  • 14 files changed
  • 5 contributors

Commits on Feb 2, 2022

  1. force multiline function signatures to separate the body

    Even when there is no empty line to begin with.
    
    Fixes #73.
    tsnewaz authored Feb 2, 2022
    Configuration menu
    Copy the full SHA
    4a0cea1 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2022

  1. 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.
    tsnewaz authored Feb 4, 2022
    Configuration menu
    Copy the full SHA
    6333469 View commit details
    Browse the repository at this point in the history
  2. 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.
    mvdan committed Feb 4, 2022
    Configuration menu
    Copy the full SHA
    f32c372 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2022

  1. fix panic with go1.18 workspaces

    When running inside a Go workspace, go list -m returns all modules in
    the workspace.
    tie authored and mvdan committed Feb 12, 2022
    Configuration menu
    Copy the full SHA
    bef63db View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2022

  1. format: remove unused function

    ebati authored Feb 18, 2022
    Configuration menu
    Copy the full SHA
    9685193 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2022

  1. 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.
    mvdan committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    d74ca43 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9827b59 View commit details
    Browse the repository at this point in the history
  3. 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.
    mvdan committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    6b39b9e View commit details
    Browse the repository at this point in the history
  4. sync gofmt.go with Go 1.18rc1

    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.
    mvdan committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    99c3b4c View commit details
    Browse the repository at this point in the history
  5. rework multiline func signatures

    we were checking the column position but that doesn't work for
    nested/scoped funcs
    tsnewaz authored and mvdan committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    acf11b6 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2022

  1. 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.
    mvdan committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    487b40b View commit details
    Browse the repository at this point in the history
  2. mod: update deps

    mvdan committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    ec957d2 View commit details
    Browse the repository at this point in the history
  3. README: neovim install instructions

    sbaildon authored and mvdan committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    e676cd6 View commit details
    Browse the repository at this point in the history
  4. write changelog for v0.3.0

    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.
    mvdan committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    0402b97 View commit details
    Browse the repository at this point in the history
Loading
0