Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKatasRegistry = NewKatasRegistry()
DefaultKatasRegistry is the default registry.
View Source
var Registry = DefaultKatasRegistry
Registry is the global registry.
Functions ¶
func RegisterKata ¶
RegisterKata registers a new Kata with the default registry.
Types ¶
type Kata ¶
type Kata struct {
ID string
Title string
Description string
Check func(node ast.Node) []Violation
}
Kata represents a single linting rule.
type KatasRegistry ¶ added in v0.0.4
KatasRegistry is a registry for all available Katas.
func NewKatasRegistry ¶ added in v0.1.1
func NewKatasRegistry() *KatasRegistry
NewKatasRegistry creates a new KatasRegistry.
func (*KatasRegistry) Check ¶ added in v0.0.4
func (kr *KatasRegistry) Check(node ast.Node, disabledKatas []string) []Violation
func (*KatasRegistry) GetKata ¶ added in v0.0.4
func (kr *KatasRegistry) GetKata(id string) (Kata, bool)
GetKata returns a Kata by its ID.
func (*KatasRegistry) KatasByNodeType ¶ added in v0.0.4
func (kr *KatasRegistry) KatasByNodeType() map[string][]Kata
KatasByNodeType returns all registered Katas grouped by node type.
func (*KatasRegistry) RegisterKata ¶ added in v0.1.1
func (kr *KatasRegistry) RegisterKata(nodeType ast.Node, kata Kata)
RegisterKata registers a new Kata.
Source Files
¶
- katas.go
- zc1001.go
- zc1002.go
- zc1003.go
- zc1004.go
- zc1005.go
- zc1006.go
- zc1007.go
- zc1008.go
- zc1009.go
- zc1010.go
- zc1011.go
- zc1012.go
- zc1013.go
- zc1014.go
- zc1015.go
- zc1016.go
- zc1017.go
- zc1018.go
- zc1019.go
- zc1020.go
- zc1021.go
- zc1022.go
- zc1023.go
- zc1024.go
- zc1025.go
- zc1026.go
- zc1027.go
- zc1028.go
- zc1029.go
- zc1030.go
- zc1031.go
- zc1032.go
- zc1033.go
- zc1034.go
- zc1035.go
- zc1036.go
- zc1037.go
- zc1038.go
- zc1039.go
- zc1040.go
- zc1041.go
- zc1042.go
- zc1043.go
- zc1044.go
- zc1045.go
- zc1046.go
- zc1047.go
- zc1048.go
- zc1049.go
- zc1050.go
- zc1051.go
- zc1052.go
- zc1053.go
- zc1054.go
- zc1055.go
- zc1056.go
- zc1057.go
- zc1058.go
- zc1059.go
- zc1060.go
- zc1061.go
- zc1062.go
- zc1063.go
- zc1064.go
- zc1065.go
- zc1066.go
- zc1067.go
- zc1068.go
- zc1069.go
- zc1070.go
- zc1071.go
- zc1072.go
- zc1073.go
- zc1074.go
- zc1075.go
- zc1076.go
- zc1077.go
- zc1078.go
- zc1079.go
- zc1080.go
- zc1081.go
- zc1082.go
- zc1083.go
- zc1084.go
- zc1085.go
- zc1086.go
- zc1087.go
- zc1088.go
- zc1089.go
- zc1090.go
- zc1091.go
- zc1092.go
- zc1096.go
- zc1097.go
- zc1098.go
- zc1099.go
- zc1102.go
- zc1103.go
- zc1104.go
- zc1105.go
- zc1106.go
Click to show internal directories.
Click to hide internal directories.