* 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)
| 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. |
no test coverage detected