Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

No Diagnostics from CodeQL Language Server

Offen
#4,303 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Bereich
devtools

Rechercherichtung

Reproduziere die Abfolge mit codeql execute language-server --check-errors=ON_CHANGE -v: Initialisiere den Arbeitsbereich, öffne codeql-pack.yml und öffne anschließend eine .ql-Datei, die Syntax- und semantische Fehler enthält. Untersuche die LSP-Benachrichtigungen und Initialisierungsoptionen rund um das Laden des Packs; abgeschlossen ist die Aufgabe, wenn die erforderliche Konfiguration oder Benachrichtigung identifiziert wurde, durch die die Diagnosen nach dem Öffnen des Packs wieder fortgesetzt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug VSCode

Describe the bug
CodeQL Language Server suppresses diagnostics when a QL pack is loaded

Context:
We are building a headless Python LSP client for CodeQL to automate query synthesis. We are using the CodeQL CLI version 2.20.1 (via codeql execute language-server).

Current Implementation:

  1. Server Start: codeql execute language-server --check-errors=ON_CHANGE -v
  2. Initialization: Standard initialize request with rootUri pointing to a workspace.
  3. Pack Setup: We create a valid codeql-pack.yml in the workspace with dependencies: { codeql/cpp-all: "^4.3.1" } and run codeql pack install.
  4. Pack Loading: We send textDocument/didOpen for the codeql-pack.yml file to trigger pack resolution (this successfully fixes "unresolved module" errors).
  5. Query Opening: We send textDocument/didOpen for a .ql query file inside the pack.
library: false
name: temp-workspace
version: 0.0.0
dependencies:
  codeql/cpp-all: ^4.3.1

The Issue:
When we do not open the codeql-pack.yml file (Pack Mode inactive), the server reports diagnostics correctly (e.g., "could not resolve module cpp" or syntax errors). However, we no other solution like qlpack.yml was working to correctly point the language server to standard library location, even with --search-path or putting the search path explicitly in initializationOptions

However, as soon as we do open the codeql-pack.yml file (Pack Mode active), the server stops reporting ALL diagnostics for subsequently opened query files.

  • Semantic errors (e.g., import non_existent_module) -> 0 diagnostics
  • Syntax errors (e.g., select 1 +) -> 0 diagnostics

Observations:

  • The server does not send any workspace/configuration requests to the client.
  • The server does not send any client/registerCapability requests.
  • Providing a valid database path in initializationOptions does not resolve the issue.
  • The didOpen for the pack file appears to successfully load the dependencies (because the "unresolved module" error disappears), but it seems to put the diagnostic engine into a silent state.

Question:
Is there a specific LSP notification, configuration option, or initialization parameter required to re-enable continuous diagnostic reporting (--check-errors=ON_CHANGE) after a QL pack has been loaded?

Technical Context:

CodeQL CLI Version: 2.20.1 (implied from dependencies)
Transport: Stdio with JSON-RPC 2.0
OS: Windows 11
Arguments: codeql execute language-server --check-errors=ON_CHANGE -v

Thanks for your time!
Rajat

Vorherrschende Sprache
TypeScript
Sterne
539
Forks
240
Ø Merge
2 T. 18 Std.
Gemergte PRs (30 T.)
37

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/vscode-codeql

Alle Issues in github/vscode-codeql

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.