github.com/songshiyun/revive@v1.1.5-0.20220323112655-f8433a19b3c5/test/banned-characters_test.go (about) 1 package test 2 3 import ( 4 "testing" 5 6 "github.com/songshiyun/revive/lint" 7 "github.com/songshiyun/revive/rule" 8 ) 9 10 // Test banned characters in a const, var and func names. 11 // One banned character is in the comment and should not be checked. 12 // One banned character from the list is not present in the fixture file. 13 func TestBannedCharacters(t *testing.T) { 14 testRule(t, "banned-characters", &rule.BannedCharsRule{}, &lint.RuleConfig{ 15 Arguments: []interface{}{"Ω", "Σ", "σ", "1"}, 16 }) 17 }