Add `codeql` executable to PATH of VS Code Terminal
Mantenedores costumam responder em até 3 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 38/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- typescript, vscode
- Domínio
- developer-experience
Direção de pesquisa
Comece em extension.ts, na função activate, e revise o suporte do VS Code a environmentVariableCollection. Compare a prova de conceito com as questões em aberto sobre a ordem de PATH, atualizações de CLI, caminhos personalizados e ativação do terminal; considera-se concluído quando o comportamento pretendido estiver definido e codeql estiver disponível nos terminais do VS Code compatíveis.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Is your feature request related to a problem? Please describe.
In some cases it is still necessary to use the CodeQL CLI, such as for creating a database (see also #306). If you don't want to manually install the CodeQL CLI but instead want to rely on the extension installing the latest version, this is a bit cumbersome because the executable is not by default available on the PATH, and its directory name (the distributionX part) changes after every CodeQL CLI update.
Describe the solution you'd like
At least the extension could make the codeql executable available in the VS Code Terminal, see for example https://code.visualstudio.com/updates/v1_46#_environment-variable-collection, and possibly related https://github.com/microsoft/vscode-python/issues/11039 (might contain useful information and links).
Open questions:
- Should this be opt-in / opt-out (or always active without being possible to deactivate)?
- Should it prepend or append the CodeQL CLI directory to the PATH?
(would make a difference if the user has already anothercodeqlexecutable on the PATH) - Will this correctly handle CodeQL CLI updates performed by the extension (automatic or manually triggered)?
(or willcodeqlnot be available in all open terminals afterwards anymore) - Will this correctly handle setting a custom CodeQL CLI path in the settings while the extension is running?
(and what is the 'correct' behavior? maybe it is desired that already open Terminals keep using the previously used CodeQL CLI) - Will
codeqlbe available in the Terminal even if the extension hasn't been activated yet?
(looks like this is the case if the extension had been activated previously when VS Code was open; not sure why this works)
As proof of concept I added locally the following to the activate function in extension.ts:
const collection = ctx.environmentVariableCollection;
const separator = process.platform === "win32" ? ";" : ":";
collection.prepend(
"PATH",
`C:\\Users\\user\\AppData\\Roaming\\Code\\User\\globalStorage\\github.vscode-codeql\\distribution16\\codeql${separator}`,
);
And that seems to work, making codeql available in the VS Code Terminal (if opened after the extension has been activated).
Describe alternatives you've considered
- Let the extension add the CodeQL CLI globally to the PATH, so it is available even outside of VS Code
Probably not easily possible in a portable way, might make it difficult to update the PATH when the CodeQL CLI is updated, and might also not properly update the PATH when the extension is uninstalled. - The user has to manually install CodeQL CLI, add it to the PATH and specify it in the extension settings
They won't receive automatic updates this way though.
- Linguagem predominante
- TypeScript
- Estrelas
- 540
- Forks
- 242
- Merge médio
- 2d 20h
- PRs com merge (30d)
- 36
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/vscode-codeql
-
bug VSCode
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
github/vscode-codeql#4471 · 1 comentário ·
Mantenedores costumam responder em até 3 dias
-
bug enhancement VSCode
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
github/vscode-codeql#592 · 2 comentários ·
Mantenedores costumam responder em até 3 dias
-
enhancement VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
github/vscode-codeql#4432 · 1 comentário ·
Mantenedores costumam responder em até 3 dias
-
bug VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
github/vscode-codeql#4356 ·
Mantenedores costumam responder em até 3 dias
-
bug VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 64/100
github/vscode-codeql#4339 · 1 comentário ·
Mantenedores costumam responder em até 3 dias
Todas as issues de github/vscode-codeql
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Doist/todoist-cli#576 ·
Mantenedores costumam responder em até 1 dia
-
Suggestion: document (or optionally add) a cheaper-model config for find-skills on Claude CodeAbertafeature
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
vercel-labs/skills#2370 ·
Mantenedores costumam responder em até 1 dia
-
🐛 Bug supabase/cli
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
CopilotKit/aimock#491 ·
Mantenedores costumam responder em até 1 dia