Skip to content

Commit 89ed4fe

Browse files
committed
fix: related to new rules.
1 parent a4b9ae2 commit 89ed4fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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/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"

0 commit comments

Comments
 (0)