You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
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. 🙏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validateConfigwith the sharedLANGUAGESregistryWhy
LANGUAGESalready includes languages such astsx,jsx,c,cpp,csharp,vue,liquid,pascal, andscala, butvalidateConfighad 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.tsnpm run buildnpm test