Skip to content

## Pull Request Overview #2932

Closed as not planned
Closed as not planned
@Djubz

Description

@Djubz

Pull Request Overview

This PR updates language handling to rely on the CodeQL CLI for alias resolution and tracing detection, renames the Language enum to KnownLanguage, simplifies parsing logic in config-utils.ts, and adds async utilities.

  • Introduce asyncFilter/asyncSome in util.js for async predicate operations.
  • Replace sync tracing checks with async file-based checks (isTracedLanguage) and use them throughout.
  • Remove hardcoded Language enum in favor of KnownLanguage and drive parsing via the CLI (betterResolveLanguagesgetSupportedLanguageMap).

Reviewed Changes

Copilot reviewed 60 out of 60 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/util.js Added asyncFilter and asyncSome helpers.
lib/languages.js Dropped old Language enum and parsing, now only exports KnownLanguage.
lib/start-proxy.js New parseLanguage implementation with alias support.
lib/tracer-config.js Switched shouldEnableIndirectTracing to async language checks.
lib/config-utils.js Simplified getLanguages/getRawLanguages, renamed some exports.
lib/codeql.js Added isTracedLanguage, isScannedLanguage, and getSupportedLanguageMap.
lib/autobuild.js Updated to use async tracing checks; refactored parameter order.
Tests (various) Updated to use KnownLanguage, added new async stubs.
Comments suppressed due to low confidence (2)

lib/autobuild.js:61

  • Checking if (!autobuildLanguages) will never catch the case where autobuildLanguages is an empty array because an empty array is truthy. Replace this with if (autobuildLanguages.length === 0) to correctly handle no-trace languages.
if (!autobuildLanguages) {

lib/start-proxy.test.js:115

  • [nitpick] Add tests for the remaining aliases defined in LANGUAGE_ALIASES, such as "javascript-typescript"KnownLanguage.javascript and "java-kotlin"KnownLanguage.java, to ensure full coverage of alias mappings.
t.deepEqual((0, start_proxy_1.parseLanguage)("typescript"), languages_1.KnownLanguage.javascript);

Originally posted by @Copilot in #2914 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions