MCPcopy Create free account
hub / github.com/driangle/taskmd / issueRange

Function issueRange

apps/vscode/src/diagnostics.ts:26–43  ·  view source on GitHub ↗
(
  issue: ValidationIssue,
  fm: ParsedFrontmatter
)

Source from the content-addressed store, hash-verified

24}
25
26function issueRange(
27 issue: ValidationIssue,
28 fm: ParsedFrontmatter
29): vscode.Range {
30 const field = fm.fields.get(issue.field);
31
32 if (!field) {
33 // Missing field — highlight the closing `---` line
34 return new vscode.Range(fm.endLine, 0, fm.endLine, 3);
35 }
36
37 if (issue.target === "key") {
38 return toVscodeRange(field.keyRange);
39 }
40
41 // Default to value range for "value" and "block" targets when field exists
42 return toVscodeRange(field.valueRange);
43}
44
45function toVscodeRange(range: {
46 start: { line: number; col: number };

Callers 1

toDiagnosticsFunction · 0.85

Calls 2

toVscodeRangeFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected