1
0
mirror of https://github.com/mgechev/revive.git synced 2025-10-30 23:37:49 +02:00

Allow longer markers

This commit is contained in:
mgechev
2017-11-19 20:34:40 -08:00
parent 26cae846b8
commit 69cbcb6510
2 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ func TestArgumentLimit(t *testing.T) {
program := `
package foo
[@e]func foo(a int, b int, c int)[/@e] {
[@1]func foo(a int, b int, c int)[/@1] {
return a + b + c;
}
`

View File

@@ -9,8 +9,8 @@ import (
"github.com/mgechev/revive/rule"
)
var anyRe = regexp.MustCompile(`\[\/?@(\w)\]`)
var closingRe = regexp.MustCompile(`\[\/@(\w)\]`)
var anyRe = regexp.MustCompile(`\[\/?@(\w+)\]`)
var closingRe = regexp.MustCompile(`\[\/@(\w+)\]`)
type pos struct {
start int