Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow using new CodeQL languages without updating the CodeQL Action#2914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
henrymercer wants to merge6 commits intomain
base:main
Choose a base branch
Loading
fromhenrymercer/language-extensibility

Conversation

henrymercer
Copy link
Contributor

This PR revives#779, adding a few new features:

  • Correctly handle language aliases (these didn't exist at the time)
  • Determine whether or not a language is traced by looking for itstracing-config.lua file — this is what we do in the CLI too
  • Simplify the parsing logic inconfig-utils.ts

Commit-by-commit review recommended as one commit has a large diff from renaming theLanguage enum toKnownLanguage.

Caveats:

  • We don't attempt to make language handling in thestart-proxy Action generic, because this Action can't assume access to the CodeQL CLI, which is the source of truth. However this is probably OK because the default behaviour of this Action, i.e. not to proxy anything, is OK for new languages.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm thereadme has been updated if necessary.
  • Confirm thechangelog has been updated if necessary.

@CopilotCopilotAI review requested due to automatic review settingsMay 30, 2025 17:05
@henrymercerhenrymercer requested a review froma team as acode ownerMay 30, 2025 17:05
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

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

  • IntroduceasyncFilter/asyncSome inutil.js for async predicate operations.
  • Replace sync tracing checks with async file-based checks (isTracedLanguage) and use them throughout.
  • Remove hardcodedLanguage enum in favor ofKnownLanguage 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
FileDescription
lib/util.jsAddedasyncFilter andasyncSome helpers.
lib/languages.jsDropped oldLanguage enum and parsing, now only exportsKnownLanguage.
lib/start-proxy.jsNewparseLanguage implementation with alias support.
lib/tracer-config.jsSwitchedshouldEnableIndirectTracing to async language checks.
lib/config-utils.jsSimplifiedgetLanguages/getRawLanguages, renamed some exports.
lib/codeql.jsAddedisTracedLanguage,isScannedLanguage, andgetSupportedLanguageMap.
lib/autobuild.jsUpdated to use async tracing checks; refactored parameter order.
Tests (various)Updated to useKnownLanguage, added new async stubs.
Comments suppressed due to low confidence (2)

lib/autobuild.js:61

  • Checkingif (!autobuildLanguages) will never catch the case whereautobuildLanguages is an empty array because an empty array is truthy. Replace this withif (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 inLANGUAGE_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);

Base automatically changed fromhenrymercer/bump-minimum-codeql-2.16.6 tomainJune 9, 2025 21:43
@mbgmbg mentioned this pull requestJul 2, 2025
3 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@henrymercer

[8]ページ先頭

©2009-2025 Movatter.jp