Reuse parsed validation content by blob
This commit is contained in:
@@ -36,7 +36,10 @@ It follows committed symlink declarations through the captured tree and fails
|
||||
with an inspection cause when their selected contents are unavailable. A
|
||||
replacement with no parsed version is reported with its go.mod path, line,
|
||||
directive, and target; versioned replacements are allowed. It runs after the
|
||||
workspace-file check using the same candidate inventory.
|
||||
workspace-file check using the same candidate inventory. Resolved module bodies
|
||||
are parsed once per blob object ID; only owned filesystem-replacement targets
|
||||
and line numbers remain cached. Each declaration path receives findings from
|
||||
that summary in its own path context.
|
||||
The optional file-size check uses each blob's captured Git size, including
|
||||
symlink link-text bytes, and skips entries without a blob size such as gitlinks.
|
||||
It applies normalized literal file/directory exclusions with path-boundary
|
||||
@@ -63,13 +66,16 @@ autolinks, images, titles, and their source use sites, and to build heading
|
||||
anchors from visible AST text. It supports ATX and Setext headings, decodes
|
||||
Markdown text through the parser, and assigns collision-free numeric suffixes
|
||||
to repeated anchors. Link locations use one-based line and byte-column values.
|
||||
A per-path cache retains parsed records and anchors for candidate documents.
|
||||
The Markdown cache shares parsed records and anchors by regular blob object ID,
|
||||
with a path lookup for callers. Retained destinations and titles own their
|
||||
string storage, and parsed records contain content-relative locations only.
|
||||
|
||||
`checkMarkdownLinks` examines regular `.md` blobs from the captured tree. It
|
||||
skips schemed and protocol-relative URIs, strips query components, and decodes
|
||||
percent escapes once in local paths and fragments. It resolves destinations
|
||||
through `CandidateTree.ResolveDestination`; decoded fragments are compared in
|
||||
lowercase against anchors from the resolved regular Markdown document. Missing
|
||||
through `CandidateTree.ResolveDestination` relative to the current source path;
|
||||
decoded fragments are compared in lowercase against anchors from the resolved
|
||||
regular Markdown document. Missing
|
||||
paths, symlink cycles, and missing anchors produce `markdown-links` findings at
|
||||
the source use site. Outside-checkout links produce out-of-scope observations by
|
||||
default and findings when boundary enforcement is selected. Submodule-content
|
||||
|
||||
Reference in New Issue
Block a user