We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24281e8 commit 793b81bCopy full SHA for 793b81b
src/workflow/syntax/syntax-test-utils.ts
@@ -143,6 +143,9 @@ export function analyzeTopLevelInjectionContexts(
143
const contexts: RunShellContext[] = grammar.patterns.map(pattern => {
144
const repoKey = pattern.include.replace(/^#/, "");
145
const rule = grammar.repository[repoKey];
146
+ if (!rule) {
147
+ throw new Error(`Repository rule not found for ${repoKey}`);
148
+ }
149
const embeddedRule = rule.patterns.find(p => p.contentName?.startsWith("meta.embedded.block."));
150
if (!embeddedRule?.begin || !embeddedRule.end || !embeddedRule.contentName) {
151
throw new Error(`Embedded run rule not found for ${repoKey}`);
0 commit comments