mirror of
https://github.com/mgechev/revive.git
synced 2024-11-28 08:49:11 +02:00
18 lines
483 B
Go
18 lines
483 B
Go
|
package test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/mgechev/revive/lint"
|
||
|
"github.com/mgechev/revive/rule"
|
||
|
)
|
||
|
|
||
|
// Test banned characters in a const, var and func names.
|
||
|
// One banned character is in the comment and should not be checked.
|
||
|
// One banned character from the list is not present in the fixture file.
|
||
|
func TestBannedCharacters(t *testing.T) {
|
||
|
testRule(t, "banned-characters", &rule.BannedCharsRule{}, &lint.RuleConfig{
|
||
|
Arguments: []interface{}{"Ω", "Σ", "σ", "1"},
|
||
|
})
|
||
|
}
|