1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

Add denyRegex support for import-alias-naming rule (#927)

This commit is contained in:
Denis Voytyuk
2023-10-29 13:19:53 +01:00
committed by GitHub
parent cb72bd880d
commit fd9a130d7a
6 changed files with 143 additions and 19 deletions

View File

@@ -0,0 +1,17 @@
package fixtures
import (
_ "strings"
bar_foo "strings"
fooBAR "strings"
v1 "strings" // MATCH /import name (v1) must NOT match the regular expression: ^((v\d+)|(v\d+alpha\d+))$/
v1alpha1 "strings" // MATCH /import name (v1alpha1) must NOT match the regular expression: ^((v\d+)|(v\d+alpha\d+))$/
magical "magic/hat"
)
func somefunc() {
fooBAR.Clone("")
bar_foo.Clone("")
v1.Clone("")
magical.Clone("")
}