fix: address docs checker review findings
Check every link reference definition, decode destinations per CommonMark, report correct lines for empty headings, autolinks and nested definitions, reject symlinked record directories and wrong-case path components, and refuse titles that cannot pass. Only top-level headings count (spec section 6). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
789931d90f
commit
d579e38ba5
8 files changed
+146
-27
No files matched your search
@@ -57,10 +57,14 @@ func Check(root string) (Result, error) {
|
||||
c := &checker{root: root, realRoot: real}
|
||||
var recs []*record
|
||||
for _, d := range dirs {
|
||||
entries, err := os.ReadDir(filepath.Join(root, d.dir))
|
||||
if os.IsNotExist(err) {
|
||||
if st, err := os.Lstat(filepath.Join(root, d.dir)); os.IsNotExist(err) {
|
||||
continue
|
||||
} else if err != nil {
|
||||
} else if err == nil && !st.IsDir() {
|
||||
c.add(d.dir, 1, "must be a real directory (symlinks are not allowed)")
|
||||
continue
|
||||
}
|
||||
entries, err := os.ReadDir(filepath.Join(root, d.dir))
|
||||
if err != nil {
|
||||
return Result{}, err
|
||||
}
|
||||
for _, e := range entries {
|
||||
|
||||
Reference in new issue
Block a user