| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This workflow checks that src/resolved-languages.json exists and is up-to-date with respect to the default (linked) CodeQL version.
This commit fixes the BetterResolveLanguagesOutput interface, which
currently defines the `extractors` map values as tuples:
[ { extractor_root: string; ... }, ]
Instead of arrays (which are what the CodeQL CLI produces):
Array<{ extractor_root: string; ... }>
There was a problem hiding this comment.
This PR adds functionality to resolve supported languages without requiring the CodeQL CLI to be available. It introduces getStoredSupportedLanguageMap() function and refactors the existing language resolution logic to support both CLI-based and stored language maps.
Key changes:
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file| File | Description |
|---|---|
| src/resolved-languages.json | New static file containing pre-resolved language and extractor information |
| src/config-utils.ts | Added getStoredSupportedLanguageMap(), refactored getLanguages() signature, and extracted buildSupportedLanguageMap() helper |
| src/config-utils.test.ts | Updated test calls to match new getLanguages() signature |
| src/codeql.ts | Updated BetterResolveLanguagesOutput interface to use consistent array type |
| lib/init-action.js | Generated JavaScript reflecting the TypeScript changes |
| .github/workflows/validate-resolved-languages.yml | New workflow to validate the stored language file stays current |
Sorry, something went wrong.
| OverlayDatabaseMode, | ||
| } from "./overlay-database-utils"; | ||
| import { RepositoryNwo } from "./repository"; | ||
| import * as resolvedLanguages from "./resolved-languages.json"; |
There was a problem hiding this comment.
The import statement assumes the JSON file will always be valid. Consider adding runtime validation to ensure the imported data conforms to the expected BetterResolveLanguagesOutput structure, or handling potential parsing errors gracefully.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR adds getStoredSupportedLanguageMap() and refactors getLanguages() so that the init action can get the list of supported languages (along with their aliases) even when the CodeQL CLI is unavailable.
getStoredSupportedLanguageMap() is currently unused. It will be used in a future PR.
Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist