MCPcopy Create free account
hub / github.com/scopecraft/command / filterFilesForTool

Function filterFilesForTool

scripts/code-check.ts:135–149  ·  view source on GitHub ↗
(files: string[], tool: 'biome' | 'typescript')

Source from the content-addressed store, hash-verified

133
134// Filter files for specific tools
135function filterFilesForTool(files: string[], tool: 'biome' | 'typescript'): string[] {
136 return files.filter(file => {
137 if (!file || !file.trim()) return false;
138
139 if (tool === 'biome') {
140 return file.match(/\.(ts|tsx|js|jsx|json)$/);
141 }
142
143 if (tool === 'typescript') {
144 return file.match(/\.(ts|tsx)$/);
145 }
146
147 return false;
148 });
149}
150
151// Parse TypeScript errors and filter by file paths
152function parseAndFilterTSErrors(tsOutput: string, filesToShow: string[]): { filteredErrors: string[], totalErrors: number, filteredCount: number } {

Callers 1

runChecksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…