sfcoe-ailabs
Version:
AI-powered code review tool with static analysis integration for comprehensive code quality assessment.
54 lines (53 loc) • 2.47 kB
TypeScript
import { ReviewHint } from '../aiProvider/index.js';
import { TableEntry } from './index.js';
/**
* Utility class for creating and managing table entries
*/
export declare class TableEntryUtils {
/**
* Create a table entry from a review hint
*
* @param fileName - The name of the file being processed
* @param hint - The review hint containing violation information
* @returns A formatted table entry with extracted information
*/
static createTableEntryFromHint(fileName: string, hint: ReviewHint): TableEntry;
/**
* Create a custom table entry
*
* @param fileName - The name of the file being processed
* @param lineNumber - The line number where the issue occurs
* @param ruleType - The category/type of the rule violation
* @param issue - Description of the issue found
* @param suggestedFix - Suggested fix for the issue
* @returns A formatted table entry with the provided information
*/
static createCustomTableEntry(fileName: string, lineNumber: number, ruleType: string, issue: string, suggestedFix: string): TableEntry;
/**
* Check if entry should be added (not already in set)
*
* @param entryKey - The unique key for the entry
* @param addedEntries - Set of already processed entry keys
* @returns True if the entry should be added, false if it already exists
*/
static shouldAddEntry(entryKey: string, addedEntries: Set<string>): boolean;
/**
* Add entry to collection if not already present
*
* @param entries - Array of table entries to add to
* @param entry - The table entry to potentially add
* @param entryKey - The unique key for the entry
* @param addedEntries - Set of already processed entry keys
* @returns True if the entry was added, false if it already existed
*/
static addEntryIfNotExists(entries: TableEntry[], entry: TableEntry, entryKey: string, addedEntries: Set<string>): boolean;
/**
* Batch create table entries from multiple hints
*
* @param fileName - The name of the file being processed
* @param hints - Array of review hints to convert to table entries
* @param addedEntries - Set of already processed entry keys to avoid duplicates
* @returns Array of table entries created from the hints
*/
static createTableEntriesFromHints(fileName: string, hints: ReviewHint[], addedEntries: Set<string>): TableEntry[];
}