final review

This commit is contained in:
Pedro Rodrigues
2026-01-21 16:53:34 +00:00
parent 663d784e24
commit 221215b707
4 changed files with 12 additions and 57 deletions

View File

@@ -202,10 +202,6 @@ function buildAgents(): void {
}
}
if (rule.supabaseNotes) {
output.push(`**Supabase Note:** ${rule.supabaseNotes}\n`);
}
if (rule.references && rule.references.length > 0) {
if (rule.references.length === 1) {
output.push(`Reference: ${rule.references[0]}\n`);

View File

@@ -194,14 +194,6 @@ function extractReferences(body: string): string[] {
return references;
}
/**
* Extract Supabase notes
*/
function extractSupabaseNotes(body: string): string | undefined {
const match = body.match(/\*\*Supabase Note:\*\*\s*(.+?)(?=\n\n|\n\*\*|$)/s);
return match ? match[1].trim() : undefined;
}
/**
* Parse a rule file and return structured data
*/
@@ -237,8 +229,7 @@ export function parseRuleFile(filePath: string): ParseResult {
// Extract other fields
const explanation = extractExplanation(body);
const examples = extractExamples(body);
const references = extractReferences(body);
const supabaseNotes = extractSupabaseNotes(body);
const tags = frontmatter.tags?.split(",").map((t) => t.trim()) || [];
// Validation warnings
@@ -258,9 +249,8 @@ export function parseRuleFile(filePath: string): ParseResult {
impactDescription: frontmatter.impactDescription,
explanation,
examples,
references: references.length > 0 ? references : undefined,
references: extractReferences(body),
tags: tags.length > 0 ? tags : undefined,
supabaseNotes,
};
return { success: true, rule, errors, warnings };