Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Anomalies ¶
type Anomalies []Anomaly
Anomalies is a collection of problems in a CODEOWNERS file
type Anomaly ¶
type Anomaly struct { LineNo int `json:"lineNo"` Reason string `json:"reason"` Raw string `json:"raw"` }
Anomaly represents a problem in a CODEOWNERS file
type Line ¶
type Line struct { // rule, section-heading, comment, ignorable-comment, empty, unknown, Type string `json:"type"` LineNo int `json:"lineNo"` Raw string `json:"raw"` // rule only RulePattern string `json:"rulePattern"` RuleSection string `json:"ruleSection"` // section heading SectionOptional bool `json:"sectionOptional"` SectionName string `json:"sectionName"` SectionMinApprovers int `json:"sectionMinApprovers"` // rule and section heading Spaces string `json:"spaces"` Owners []Owner `json:"owners"` InlineComment string `json:"inlineComment"` }
Line represents a line in a CODEOWNERS file
type Owner ¶
type Owner struct { // user-or-group, e-mail, invalid Type string `json:"type"` Name string `json:"name"` }
Owner represents an owner in rule or section-heading
Types:
- "user-or-group" (these start with an "@" symbol e.g. @john_doe or @the_a_team)
- "e-mail" (e-mail addresses. We're not checking against the entire RFC 5322, just a simple check for presence of an "@" symbol)
- "invalid" (anything else)
func ParseOwner ¶
Click to show internal directories.
Click to hide internal directories.