Skip to content

fix(config): validate languages from shared registry#265

Closed
okbexx wants to merge 1 commit into
colbymchenry:mainfrom
okbexx:fix/config-supported-languages
Closed

fix(config): validate languages from shared registry#265
okbexx wants to merge 1 commit into
colbymchenry:mainfrom
okbexx:fix/config-supported-languages

Conversation

@okbexx
Copy link
Copy Markdown

@okbexx okbexx commented May 21, 2026

Summary

  • replace the stale hard-coded language allowlist in validateConfig with the shared LANGUAGES registry
  • add regression coverage that every registered language validates and unknown languages are still rejected

Why

LANGUAGES already includes languages such as tsx, jsx, c, cpp, csharp, vue, liquid, pascal, and scala, but validateConfig had a smaller local allowlist. A user config that explicitly listed one of those supported languages could be rejected as invalid.

Test plan

  • npm test -- --run __tests__/foundation.test.ts -t "supported language|unknown languages"
  • npm test -- --run __tests__/foundation.test.ts
  • npm run build
  • npm test

@colbymchenry
Copy link
Copy Markdown
Owner

Thanks for this, @okbexx — and sorry for the timing. This was a legitimate fix when you opened it: validateConfig() did carry a stale, narrower language allowlist than the shared LANGUAGES registry, so configs naming tsx/vue/scala/etc. could be wrongly rejected. (#233 was a parallel attempt at the same fix.)

It's since been overtaken by #285 ("zero-config indexing driven by .gitignore"), merged May 21, which removed src/config.ts and validateConfig() entirely. CodeGraph no longer has a config file or a languages allowlist — indexing is now driven by .gitignore, so there's nothing left to validate against, and the file this PR patches no longer exists on main.

Closing as obsolete — this reflects the refactor, not the quality of the change. Appreciate the contribution and the regression coverage; hope you'll send more. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants