MCPcopy Create free account
hub / github.com/garrytan/gstack / detectWindowsFragility

Function detectWindowsFragility

scripts/test-free-shards.ts:127–138  ·  view source on GitHub ↗
(absolutePath: string)

Source from the content-addressed store, hash-verified

125 * Returns the first POSIX-only pattern hit in the file, or null if Windows-safe.
126 */
127export function detectWindowsFragility(absolutePath: string): { reason: string } | null {
128 let content: string;
129 try {
130 content = fs.readFileSync(absolutePath, 'utf-8');
131 } catch {
132 return null;
133 }
134 for (const { pattern, reason } of WINDOWS_FRAGILE_PATTERNS) {
135 if (pattern.test(content)) return { reason };
136 }
137 return null;
138}
139
140function walkTestFiles(dirPath: string): string[] {
141 const entries = fs.readdirSync(dirPath, { withFileTypes: true });

Callers 2

curateWindowsSafeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected