Skip to content

fix(config): validate languages from canonical list#233

Closed
kietdev27 wants to merge 1 commit into
colbymchenry:mainfrom
kietsocola:fix/config-language-validation
Closed

fix(config): validate languages from canonical list#233
kietdev27 wants to merge 1 commit into
colbymchenry:mainfrom
kietsocola:fix/config-language-validation

Conversation

@kietdev27
Copy link
Copy Markdown

@kietdev27 kietdev27 commented May 21, 2026

Summary

  • Validate config.languages against the canonical LANGUAGES list from src/types.ts
  • Remove the stale hard-coded language allowlist in src/config.ts
  • Add regression coverage for supported languages that were previously rejected

Why

validateConfig() only allowed a small older subset of languages. Supported languages such as php, tsx, vue, liquid, pascal, and scala could be rejected even though they are valid CodeGraph languages.

Test plan

  • npx vitest run __tests__/foundation.test.ts
  • npm run build
  • npx vitest run __tests__/foundation.test.ts __tests__/search-query-parser.test.ts __tests__/extraction.test.ts -t "supported languages|Configuration|parseQuery"

Note: npm test full suite was attempted on Windows/Node v24.14.1 but failed in unrelated installer/MCP temp cleanup tests and ended with a V8 OOM worker crash.

@colbymchenry
Copy link
Copy Markdown
Owner

Thanks for this, @kietdev27 — and sorry for the timing. This was a legitimate fix when you opened it: validateConfig() did carry a stale, narrower language allowlist than the canonical LANGUAGES list, so configs naming php/tsx/vue/etc. could be wrongly rejected.

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. The regression test was a nice touch; hope you'll send more PRs. 🙏

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