Add check for Also See for READMEs (#4261)

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-11-05 11:52:24 +01:00
committed by GitHub
parent 8759d00edd
commit fb5efa203d

View File

@@ -141,6 +141,10 @@ func sectionsFromReadme(readme string) error {
s := bufio.NewScanner(f) s := bufio.NewScanner(f)
for s.Scan() { for s.Scan() {
line := s.Text() line := s.Text()
if strings.HasPrefix(line, "## Also See") {
return fmt.Errorf("Please use %q instead of %q", "See Also", "Also See")
}
switch section { switch section {
case 0: case 0:
if strings.HasPrefix(line, "## Name") { if strings.HasPrefix(line, "## Name") {