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:
17
testdata/import-alias-naming-custom-config-with-only-deny.go
vendored
Normal file
17
testdata/import-alias-naming-custom-config-with-only-deny.go
vendored
Normal 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("")
|
||||
}
|
||||
Reference in New Issue
Block a user