feat: add c language compatibility

This commit is contained in:
Affaan Mustafa
2026-04-08 15:42:49 -07:00
parent 9bd8e8b3c7
commit 86cbe3d616
6 changed files with 45 additions and 2 deletions

View File

@@ -220,6 +220,20 @@ function runTests() {
}
})) passed++; else failed++;
console.log('\nC Detection:');
if (test('detects c from top-level .c files', () => {
const dir = createTempDir();
try {
writeTestFile(dir, 'main.c', 'int main(void) { return 0; }\n');
const result = detectProjectType(dir);
assert.ok(result.languages.includes('c'));
assert.strictEqual(result.primary, 'c');
} finally {
cleanupDir(dir);
}
})) passed++; else failed++;
// Go detection
console.log('\nGo Detection:');