1
0
mirror of https://github.com/mgechev/revive.git synced 2025-12-01 22:30:16 +02:00

feat: add support for import-alias-naming rule (#881)

This commit is contained in:
Denis Voytyuk
2023-08-28 15:26:00 +02:00
committed by GitHub
parent 0357df7bc0
commit f900b6c2d4
7 changed files with 145 additions and 0 deletions

16
testdata/import-alias-naming.go vendored Normal file
View File

@@ -0,0 +1,16 @@
package fixtures
import (
_ "strings"
bar_foo "strings" // MATCH /import name (bar_foo) must match the regular expression: ^[a-z][a-z0-9]{0,}$/
fooBAR "strings" // MATCH /import name (fooBAR) must match the regular expression: ^[a-z][a-z0-9]{0,}$/
v1 "strings"
magical "magic/hat"
)
func somefunc() {
fooBAR.Clone("")
bar_foo.Clone("")
v1.Clone("")
magical.Clone("")
}