|
4 | 4 | "isPrimary": true, |
5 | 5 | "steps": [ |
6 | 6 | { |
7 | | - "directory": "codeql-tutorial-database", |
8 | | - "description": "To run a CodeQL query, we first need a CodeQL database to run against.\n\nHere is a sample database we have prepared for you.\n\nTo select it, right-click on the `codeql-tutorial-database` folder in the Explorer view, and click `CodeQL: Set Current Database`." |
| 7 | + "description": "First, let's make sure the CodeQL extension for VS Code is active, and has installed the latest version of the CodeQL CLI.\n\nClick `Next` to check for a CodeQL CLI update, and download it if necessary." |
| 8 | + }, |
| 9 | + { |
| 10 | + "description": "Checking for a CodeQL CLI update. Click `Next` when you see a popup notification telling you that the CLI has been updated.", |
| 11 | + "commands": ["codeQL.checkForUpdatesToCLI"] |
9 | 12 | }, |
10 | 13 | { |
11 | 14 | "directory": "codeql-tutorial-database", |
12 | | - "description": "This step should automatically select the database, but it doesn't work yet! Keep going.", |
13 | | - "commands": [ |
14 | | - "codeQL.setCurrentDatabase?[file:///Users/aditya/github/codeql-codespaces-template/codeql-tutorial-database]" |
15 | | - ] |
| 15 | + "description": "To run a CodeQL query, we need to select a CodeQL database.\n\nWe have prepared a sample database for you to use in this tutorial.\nLook for the `codeql-tutorial-database` directory highlighted in the Explorer view in your left sidebar.\n\nTo select this as your current database, right-click on the directory, and click `CodeQL: Set Current Database`. Click `Next` when you have done that." |
16 | 16 | }, |
17 | 17 | { |
18 | 18 | "file": "tutorial-queries/tutorial.ql", |
|
21 | 21 | }, |
22 | 22 | { |
23 | 23 | "file": "tutorial-queries/tutorial.ql", |
24 | | - "description": "This line imports the tutorial library.", |
| 24 | + "description": "This line imports the tutorial library, so that we can reuse the logic and data from this library in our own query.", |
25 | 25 | "pattern": "import tutorial.*" |
26 | 26 | }, |
27 | 27 | { |
28 | 28 | "file": "tutorial-queries/tutorial.ql", |
29 | | - "description": "This is the query clause, which determines the output of the query.", |
| 29 | + "description": "This is the query clause. It determines the output of the query.", |
| 30 | + "selection": { |
| 31 | + "start": { |
| 32 | + "line": 7, |
| 33 | + "character": 1 |
| 34 | + }, |
| 35 | + "end": { |
| 36 | + "line": 8, |
| 37 | + "character": 8 |
| 38 | + } |
| 39 | + } |
| 40 | + }, |
| 41 | + { |
| 42 | + "file": "tutorial-queries/tutorial.ql", |
| 43 | + "description": "It is time to run your first query!\n\nClick `Next` to run this query. The results will appear in a new `CodeQL Query Results` tab.\n\nTo run queries in future, outside this tutorial:\n\n1. Right-click within a `.ql` query file, and click `CodeQL: Run Query`\nOR\n1. Open the Command Palette with `Cmd/Ctrl+Shift+P`, start typing `CodeQL`, and click on `CodeQL: Run Query`.", |
30 | 44 | "selection": { |
31 | 45 | "start": { |
32 | 46 | "line": 7, |
|
40 | 54 | }, |
41 | 55 | { |
42 | 56 | "file": "tutorial-queries/tutorial.ql", |
43 | | - "description": "Time to run your first query!\nThis query will be run automatically, and the results will open in a new tab.\n\nTo run other queries in future:\n1. Right-click within a `.ql` query file OR open the Command Palette with `Cmd/Ctrl+Shift+P`\n1. Select the command `CodeQL: Run Query`", |
| 57 | + "description": "Running your first query.", |
44 | 58 | "selection": { |
45 | 59 | "start": { |
46 | 60 | "line": 7, |
|
0 commit comments