An extension for Visual Studio Code that adds rich language support for CodeQL
Перейти к файлу
Andrew Eisenberg 6e2e72a500
Be nicer about where to open the results webview (#1037)
* Be nicer about where to open the results webview

Currently, the webview _always_ opens next to the currently active
editor. This is a pain if you already have 2 columns open since this
means that the webview will open in a third column, which is rarely
what you want.

This change uses a more sophisticated approach to opening the webview:

1. If there is only one column, open webview to the right of it
2. If there are multiple columns and the active editor is _not_ the
   last column, open to the right of the active editor
3. Otherwise open in the first column.

This will avoid opening a new column unless there is only one column
open right now.

There is no native API that vscode exposed to compare column locations,
so this uses the `ViewColumn` api is a slightly non-standard way.

A limitation is that if the last column is empty and the active editor
is to the left of it, then the webview will not be opened there (which
would be nice). Instead, it will be opened in column 1.

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
2021-12-15 19:33:53 +00:00
.github Bump cli version for integration tests 2021-12-09 13:50:41 -08:00
.vscode Use the correct environment variable in integration tests (#994) 2021-11-03 23:04:14 +00:00
extensions/ql-vscode Be nicer about where to open the results webview (#1037) 2021-12-15 19:33:53 +00:00
syntaxes Update syntaxes/README.md 2020-03-04 18:28:20 +00:00
.editorconfig Update contributing documentation and launch config 2020-03-07 16:36:09 -08:00
.gitattributes Use union merge strategy for CHANGELOG.md 2020-06-15 15:31:19 -04:00
.gitignore Add integration tests with the CLI 2020-12-04 10:08:15 -08:00
CODEOWNERS Add CODEOWNERS 2021-06-17 10:01:31 -07:00
CODE_OF_CONDUCT.md CodeQL for VS Code: Initial commit. 2019-11-13 12:23:53 -08:00
CONTRIBUTING.md Docs: add clarification on directory for running tests via CLI 2021-12-10 12:29:15 -08:00
LICENSE.md CodeQL for VS Code: Initial commit. 2019-11-13 12:23:53 -08:00
README.md Update typings for mocha (#752) 2021-02-11 16:48:52 -08:00
package-lock.json Update package lock (#1003) 2021-11-17 16:24:59 -08:00
tsconfig.json Add a top-level tsconfig.json 2020-08-24 10:58:17 -07:00
tsfmt.json Add format and lint on commit 2020-05-12 10:15:48 -07:00

README.md

CodeQL for Visual Studio Code

This project is an extension for Visual Studio Code that adds rich language support for CodeQL. It's used to find problems in code bases using CodeQL. It's written primarily in TypeScript.

The extension is released. You can download it from the Visual Studio Marketplace.

To see what has changed in the last few versions of the extension, see the Changelog.

CI status badge VS Marketplace badge

Features

  • Enables you to use CodeQL to query databases and discover problems in codebases.
  • Shows the flow of data through the results of path queries, which is essential for triaging security results.
  • Provides an easy way to run queries from the large, open source repository of CodeQL security queries.
  • Adds IntelliSense to support you writing and editing your own CodeQL query and library files.

Project goals and scope

This project will track new feature development in CodeQL and, whenever appropriate, bring that functionality to the Visual Studio Code experience.

Contributing

This project welcomes contributions. See CONTRIBUTING.md for details on how to build, install, and contribute.

License

The CodeQL extension for Visual Studio Code is licensed under the MIT License. The version of CodeQL used by the CodeQL extension is subject to the CodeQL Research Terms & Conditions.

When using the GitHub logos, be sure to follow the GitHub logo guidelines.