No Diagnostics from CodeQL Language Server
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- devtools
Direzione di ricerca
Riproduci la sequenza con codeql execute language-server --check-errors=ON_CHANGE -v: inizializza lo spazio di lavoro, apri codeql-pack.yml, quindi apri un file .ql contenente errori di sintassi e semantici. Esamina le notifiche LSP e le opzioni di inizializzazione relative al caricamento del pack; il lavoro è completato quando viene identificata la configurazione o la notifica necessaria affinché la diagnostica riprenda dopo l’apertura del pack.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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:
- Server Start:
codeql execute language-server --check-errors=ON_CHANGE -v - Initialization: Standard
initializerequest withrootUripointing to a workspace. - Pack Setup: We create a valid
codeql-pack.ymlin the workspace withdependencies: { codeql/cpp-all: "^4.3.1" }and runcodeql pack install. - Pack Loading: We send
textDocument/didOpenfor thecodeql-pack.ymlfile to trigger pack resolution (this successfully fixes "unresolved module" errors). - Query Opening: We send
textDocument/didOpenfor a.qlquery 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/configurationrequests to the client. - The server does not send any
client/registerCapabilityrequests. - Providing a valid
databasepath ininitializationOptionsdoes not resolve the issue. - The
didOpenfor 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
- Lingua principale
- TypeScript
- Stelle
- 539
- Fork
- 240
- Merge medio
- 2g 6h
- PR unite (30g)
- 29
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/vscode-codeql
-
bug VSCode
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/vscode-codeql#4471 · 1 commento ·
-
bug enhancement VSCode
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/vscode-codeql#592 · 2 commenti ·
-
enhancement VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
github/vscode-codeql#4432 · 1 commento ·
-
bug VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
github/vscode-codeql#4339 · 1 commento ·
Tutte le issue di github/vscode-codeql
Issue simili
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Apertaclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
supermomonga/zcode-acp#24 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
growthbook/growthbook#7100 ·
-
triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100