Skip to content

Commit e5a395b

Browse files
authored
Update mvdan.cc/gofumpt to v0.1.0 (#1637)
1 parent a65f15f commit e5a395b

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ require (
7373
golang.org/x/tools v0.0.0-20210105210202-9ed45478a130
7474
gopkg.in/yaml.v2 v2.4.0
7575
honnef.co/go/tools v0.0.1-2020.1.6
76-
mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475
76+
mvdan.cc/gofumpt v0.1.0
7777
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
7878
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
7979
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7

go.sum

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/linters_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ func extractRunContextFromComments(t *testing.T, sourcePath string) *runContext
215215
if !strings.HasPrefix(line, "//") {
216216
return rc
217217
}
218-
line = strings.TrimPrefix(line, "//")
218+
219+
line = strings.TrimLeft(strings.TrimPrefix(line, "//"), " ")
219220
if strings.HasPrefix(line, "args: ") {
220221
assert.Nil(t, rc.args)
221222
args := strings.TrimPrefix(line, "args: ")

test/testdata/fix/out/gofumpt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//args: -Egofumpt
2-
//config: linters-settings.gofumpt.extra-rules=true
1+
// args: -Egofumpt
2+
// config: linters-settings.gofumpt.extra-rules=true
33
package testdata
44

55
import "fmt"

test/testdata/gofumpt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//args: -Egofumpt
1+
// args: -Egofumpt
22
package testdata
33

44
import "fmt"

test/testdata/gofumpt_with_extra.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//args: -Egofumpt
2-
//config: linters-settings.gofumpt.extra-rules=true
1+
// args: -Egofumpt
2+
// config: linters-settings.gofumpt.extra-rules=true
33
package testdata
44

55
import "fmt"

0 commit comments

Comments
 (0)