Skip to content

Commit 7b5f749

Browse files
authored
Merge pull request #411 from aeisenberg/aeisenberg/readme-lgtm
Update the download from LGTM section in the readme
2 parents f2575e4 + 292bec2 commit 7b5f749

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

extensions/ql-vscode/README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
This project is an extension for Visual Studio Code that adds rich language support for [CodeQL](https://help.semmle.com/codeql) and allows you to easily find problems in codebases. In particular, the extension:
44

5-
* Enables you to use CodeQL to query databases generated from source code.
6-
* Shows the flow of data through the results of path queries, which is essential for triaging security results.
7-
* Provides an easy way to run queries from the large, open source repository of [CodeQL security queries](https://github.com/Semmle/ql).
8-
* Adds IntelliSense to support you writing and editing your own CodeQL query and library files.
5+
- Enables you to use CodeQL to query databases generated from source code.
6+
- Shows the flow of data through the results of path queries, which is essential for triaging security results.
7+
- Provides an easy way to run queries from the large, open source repository of [CodeQL security queries](https://github.com/github/codeql).
8+
- Adds IntelliSense to support you writing and editing your own CodeQL query and library files.
99

1010
To see what has changed in the last few versions of the extension, see the [Changelog](https://github.com/github/vscode-codeql/blob/master/extensions/ql-vscode/CHANGELOG.md).
1111

@@ -14,18 +14,18 @@ To see what has changed in the last few versions of the extension, see the [Chan
1414
The information in this `README` file describes the quickest way to start using CodeQL.
1515
For information about other configurations, see the separate [CodeQL help](https://help.semmle.com/codeql/codeql-for-vscode.html).
1616

17-
**Quick start: Installing and configuring the extension**
17+
### Quick start: Installing and configuring the extension
1818

1919
1. [Install the extension](#installing-the-extension).
2020
1. [Check access to the CodeQL CLI](#checking-access-to-the-codeql-cli).
2121
1. [Clone the CodeQL starter workspace](#cloning-the-codeql-starter-workspace).
2222

23-
**Quick start: Using CodeQL**
23+
### Quick start: Using CodeQL
2424

2525
1. [Import a database from LGTM](#importing-a-database-from-lgtm).
2626
1. [Run a query](#running-a-query).
2727

28-
-----
28+
---
2929

3030
## Quick start: Installing and configuring the extension
3131

@@ -49,7 +49,7 @@ If you have any difficulty with CodeQL CLI access, see the **CodeQL Extension Lo
4949
### Cloning the CodeQL starter workspace
5050

5151
When you're working with CodeQL, you need access to the standard CodeQL libraries and queries.
52-
Initially, we recommend that you clone and use the ready-to-use starter workspace, https://github.com/github/vscode-codeql-starter/.
52+
Initially, we recommend that you clone and use the ready-to-use [starter workspace](https://github.com/github/vscode-codeql-starter/).
5353
This includes libraries and queries for the main supported languages, with folders set up ready for your custom queries. After cloning the workspace (use `git clone --recursive`), you can use it in the same way as any other VS Code workspace—with the added advantage that you can easily update the CodeQL libraries.
5454

5555
For information about configuring an existing workspace for CodeQL, [see the documentation](https://help.semmle.com/codeql/codeql-for-vscode/procedures/setting-up.html#updating-an-existing-workspace-for-codeql).
@@ -58,15 +58,17 @@ For information about configuring an existing workspace for CodeQL, [see the doc
5858

5959
You can easily keep up-to-date with the latest changes to the [CodeQL standard libraries](https://github.com/github/codeql).
6060

61-
If you're using the [CodeQL starter workspace](https://github.com/github/vscode-codeql-starter/), you can pull in the latest standard libraries by running:
61+
If you're using the [CodeQL starter workspace](https://github.com/github/vscode-codeql-starter/), you can pull in the latest standard libraries by running:
62+
6263
```shell
63-
$ git pull
64-
$ git submodule update --recursive
64+
git pull
65+
git submodule update --recursive
6566
```
67+
6668
in the starter workspace directory.
6769

6870
If you're using your own clone of the CodeQL standard libraries, you can do a `git pull` from where you have the libraries checked out.
69-
71+
7072
## Quick start: Using CodeQL
7173

7274
You can find all the commands contributed by the extension in the Command Palette (**Ctrl+Shift+P** or **Cmd+Shift+P**) by typing `CodeQL`, many of them are also accessible through the interface, and via keyboard shortcuts.
@@ -75,23 +77,21 @@ You can find all the commands contributed by the extension in the Command Palett
7577

7678
While you can use the [CodeQL CLI to create your own databases](https://help.semmle.com/codeql/codeql-cli/procedures/create-codeql-database.html), the simplest way to start is by downloading a database from LGTM.com.
7779

78-
1. Log in to LGTM.com.
79-
1. Find a project you're interested in and display the **Integrations** tab (for example, [Apache Kafka](https://lgtm.com/projects/g/apache/kafka/ci/)).
80-
1. Scroll to the **CodeQL databases for local analysis** section at the bottom of the page.
81-
1. Download databases for the languages that you want to explore.
82-
1. For each database that you want to import:
83-
1. Go to the CodeQL Databases view in the sidebar. Hover over the Databases title bar and click the icon to **Choose Database from Archive**.
84-
1. Browse to the zipped database that you downloaded from LGTM.
85-
86-
Once you've added a CodeQL database, it is displayed in the Databases view.
80+
1. Open [LGTM.com](https://lgtm.com) in your browser.
81+
1. Search for a project you're interested in, for example [Apache Kafka](https://lgtm.com/projects/g/apache/kafka).
82+
1. Copy the link to that project, for example `https://lgtm.com/projects/g/apache/kafka`.
83+
1. In VS Code, open the Command Palette and choose the **CodeQL: Download Database from LGTM** command.
84+
1. Paste the link you copied earlier.
85+
1. Select the language for the database you want to download (only required if the project has databases for multiple languages).
86+
1. Once the CodeQL database has been imported, it is displayed in the Databases view.
8787

8888
### Running a query
8989

9090
The instructions below assume that you're using the CodeQL starter workspace, or that you've added the CodeQL libraries and queries repository to your workspace.
9191

9292
1. Expand the `ql` folder and locate a query to run. The standard queries are grouped by target language and then type, for example: `ql/java/ql/src/Likely Bugs`.
9393
1. Open a query (`.ql`) file.
94-
3. Right-click in the query window and select **CodeQL: Run Query**. Alternatively, open the Command Palette (**Ctrl+Shift+P** or **Cmd+Shift+P**), type `Run Query`, then select **CodeQL: Run Query**.
94+
1. Right-click in the query window and select **CodeQL: Run Query**. Alternatively, open the Command Palette (**Ctrl+Shift+P** or **Cmd+Shift+P**), type `Run Query`, then select **CodeQL: Run Query**.
9595

9696
The CodeQL extension runs the query on the current database using the CLI and reports progress in the bottom right corner of the application.
9797
When the results are ready, they're displayed in the CodeQL Query Results view. Use the dropdown menu to choose between different forms of result output.
@@ -102,10 +102,10 @@ If there are any problems running a query, a notification is displayed in the bo
102102

103103
For more information about the CodeQL extension, [see the documentation](https://help.semmle.com/codeql/codeql-for-vscode.html). Otherwise, you could:
104104

105-
* [Create a database for a different codebase](https://help.semmle.com/codeql/codeql-cli/procedures/create-codeql-database.html).
106-
* [Try out variant analysis](https://help.semmle.com/QL/learn-ql/ql-training.html).
107-
* [Learn more about CodeQL](https://help.semmle.com/QL/learn-ql/).
108-
* [Read how security researchers use CodeQL to find CVEs](https://securitylab.github.com/research).
105+
- [Create a database for a different codebase](https://help.semmle.com/codeql/codeql-cli/procedures/create-codeql-database.html).
106+
- [Try out variant analysis](https://help.semmle.com/QL/learn-ql/ql-training.html).
107+
- [Learn more about CodeQL](https://help.semmle.com/QL/learn-ql/).
108+
- [Read how security researchers use CodeQL to find CVEs](https://securitylab.github.com/research).
109109

110110
## License
111111

0 commit comments

Comments
 (0)