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 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.0
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.2.1
Choose a head ref
  • 11 commits
  • 13 files changed
  • 7 contributors

Commits on Nov 11, 2021

  1. avoid using sign.Results.Closing when it's invalid

    The position may be token.NoPos, an invalid position,
    if there's a single result parameter without parentheses.
    Using token.FileSet.Offset on token.NoPos+1 would panic:
    
    	panic: invalid Pos value 1 (should be in [774665, 781950])
    
    We didn't catch this because our tests always start with an empty
    token.FileSet, so most of our files start with the base position 1.
    A user ran into the bug when formatting many files at once.
    
    To ensure we catch these bugs quicker in the future,
    insert a dummy ten-byte file to every new FileSet we create.
    
    Finally, add a test, which reproduces the panic thanks to the dummy base
    file mentioned above.
    
    Fixes #166.
    mvdan committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    9d037d4 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2021

  1. Configuration menu
    Copy the full SHA
    7ca7e6c View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2021

  1. format: don't group interface members of different kinds

    For instance, don't group exported and unexported methods,
    nor methods with non-methods.
    
    Fixes #168.
    mvdan committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    93927ca View commit details
    Browse the repository at this point in the history
  2. format: account for leading comments in composite literals

    For an input such as:
    
    	var _ = map[string]string{
    		/*
    			joint comment
    		*/
    		"foo": "bar",
    	}
    
    We would incorrectly join the comment with the first element:
    
    	var _ = map[string]string{
    		/*
    			joint comment
    		*/ "foo": "bar",
    	}
    
    Just like in other parts of the codebase,
    consider the first comment's position if it exists.
    
    Fixes #170.
    mvdan committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    872763c View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2021

  1. add deprecated flags once again

    This way, users calling -s or -r get a helpful message.
    The use of -s can still let the tool work, for now.
    
    Fixes #174.
    Oiyoo authored Dec 12, 2021
    Configuration menu
    Copy the full SHA
    cf88391 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2021

  1. Configuration menu
    Copy the full SHA
    ea37f49 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2021

  1. mod: bump dependencies

    mvdan committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    55d7eb4 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. doc and comment spelling fixes

    scop authored Dec 16, 2021
    Configuration menu
    Copy the full SHA
    53340e7 View commit details
    Browse the repository at this point in the history
  2. format: treat noinspection as comment directive

    Used by some versions of GoLand and friends,
    https://www.jetbrains.com/help/go/disabling-and-enabling-inspections.html
    
    New versions use `//goland:noinspection` instead/additionally, but it
    doesn't hurt much to support the older (and still the only documented)
    one.
    scop authored and mvdan committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    4e57a27 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    83c82b7 View commit details
    Browse the repository at this point in the history
  4. write changelog for v0.2.1

    mvdan committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    ba9bdf9 View commit details
    Browse the repository at this point in the history
Loading