No Diagnostics from CodeQL Language Server
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Domaine
- devtools
Piste de recherche
Reproduisez la séquence avec codeql execute language-server --check-errors=ON_CHANGE -v : initialisez l’espace de travail, ouvrez codeql-pack.yml, puis ouvrez un fichier .ql contenant des erreurs de syntaxe et des erreurs sémantiques. Examinez les notifications LSP et les options d’initialisation liées au chargement du pack ; le travail est terminé lorsque la configuration ou la notification requise pour que les diagnostics reprennent après l’ouverture du pack est identifiée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 539
- Forks
- 240
- Merge moyen
- 2 j 18 h
- PR mergées (30 j)
- 37
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/vscode-codeql
-
bug VSCode
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
github/vscode-codeql#4471 · 1 commentaire ·
-
bug enhancement VSCode
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
github/vscode-codeql#592 · 2 commentaires ·
-
enhancement VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
github/vscode-codeql#4432 · 1 commentaire ·
-
bug VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 64/100
github/vscode-codeql#4339 · 1 commentaire ·
Toutes les issues de github/vscode-codeql
Issues similaires
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Mend: dependency security vulnerability untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100