{"record":{"id":"45be6741f264f8f8","repo":"gastownhall/beads","slug":"no-issues-found-in-markdown-file-expected-issu","errorCode":null,"errorMessage":"no issues found in markdown file (expected ## Issue Title format)","messagePattern":"no issues found in markdown file \\(expected ## Issue Title format\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/markdown.go","lineNumber":245,"sourceCode":"\tif line != \"\" {\n\t\tif s.currentIssue.Description != \"\" {\n\t\t\ts.currentIssue.Description += \"\\n\"\n\t\t}\n\t\ts.currentIssue.Description += line\n\t}\n}\n\n// finalize completes parsing and returns the results\nfunc (s *markdownParseState) finalize() ([]*IssueTemplate, error) {\n\t// Finalize last section and issue\n\ts.finalizeSection()\n\tif s.currentIssue != nil {\n\t\ts.issues = append(s.issues, s.currentIssue)\n\t}\n\n\t// Check if we found any issues\n\tif len(s.issues) == 0 {\n\t\treturn nil, fmt.Errorf(\"no issues found in markdown file (expected ## Issue Title format)\")\n\t}\n\n\treturn s.issues, nil\n}\n\n// createMarkdownScanner creates a scanner with appropriate buffer size\nfunc createMarkdownScanner(file *os.File) *bufio.Scanner {\n\tscanner := bufio.NewScanner(file)\n\t// Increase buffer size for large markdown files\n\tconst maxScannerBuffer = 1024 * 1024 // 1MB\n\tbuf := make([]byte, maxScannerBuffer)\n\tscanner.Buffer(buf, maxScannerBuffer)\n\treturn scanner\n}\n\nfunc parseMarkdownFile(path string) ([]*IssueTemplate, error) {\n\t// Validate and clean the file path\n\tcleanPath, err := validateMarkdownPath(path)","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/markdown.go#L227-L263","documentation":"The markdown parser extracts issues from `## Issue Title` headings. If the whole file is scanned and zero issues were collected, finalize returns this error: the file parsed fine but had no recognizable issue sections.","triggerScenarios":"parseMarkdownFile is given a syntactically valid .md file whose content uses headings other than `## Title` (e.g. `# Title`, `### Title`), or the file is empty/only prose, or issues are nested under a parent heading that shifts their level.","commonSituations":"Exported docs using H1 for issues; markdown generated by other tools with different conventions; an empty template file; issue blocks indented inside code fences so headings are not detected.","solutions":["Reformat each issue as a level-2 heading: `## Issue Title` followed by its body fields","Fix heading levels (convert `#`/`###` issue headings to `##`)","Move issue blocks out of code fences or blockquotes so the scanner sees the headings"],"exampleFix":"# before\n# Fix login bug\n# after\n## Fix login bug","handlingStrategy":"validation","validationCode":"data, _ := os.ReadFile(path)\nif !regexp.MustCompile(`(?m)^## .+`).Match(data) {\n\treturn fmt.Errorf(\"%s has no '## Issue Title' headings\", path)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Author templates with level-2 (##) headings for every issue","Keep issue headings out of code fences/blockquotes","Smoke-test generated markdown by parsing it before bulk import"],"tags":["markdown","parsing","empty-input"],"backgroundTag":"no-issues-found-in-markdown","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}