mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Add check for Also See for READMEs (#4261)
Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -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") {
|
||||||
|
|||||||
Reference in New Issue
Block a user