MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / addBlockErrors

Method addBlockErrors

src/extraction/cfml-extractor.ts:718–733  ·  view source on GitHub ↗

* Record a delegated block's errors as the file's (#2654). The block's own * extraction warns "parse produced no symbols … contributes nothing to the * graph" when its code has a syntax error and declares nothing — which a * ` ` body never does, so any SQL its grammar can't read ear

(errors: ExtractionError[], tag: SyntaxNode, tagName: 'cfscript' | 'cfquery', lineOffset: number)

Source from the content-addressed store, hash-verified

716 * file as one that contributes nothing. Other errors pass through.
717 */
718 private addBlockErrors(errors: ExtractionError[], tag: SyntaxNode, tagName: 'cfscript' | 'cfquery', lineOffset: number): void {
719 for (const error of errors) {
720 if (error.severity === 'warning' && error.code === 'parse_error') {
721 const line = tag.startPosition.row + 1;
722 this.errors.push({
723 message: `${this.filePath}: <${tagName}> at line ${line} has a syntax error — the rest of the file is indexed, but calls inside that block may be missing from the graph`,
724 line,
725 severity: 'warning',
726 code: 'partial_parse',
727 });
728 continue;
729 }
730 if (error.line) error.line += lineOffset;
731 this.errors.push(error);
732 }
733 }
734
735 /**
736 * Delegate a `<cfquery>...</cfquery>` tag's SQL body to the `cfquery` grammar.

Callers 2

delegateScriptTagMethod · 0.95
delegateQueryTagMethod · 0.95

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected