Skip to content

Commit 67c56c8

Browse files
committed
Refine tour based on feedback
Add an explicit step to check for CLI updates. This is less confusing than waiting for the CLI download when you select a DB. Update wording around selecting a DB. Fix query clause highlight location. Split query running step into two, so the user has to click Next before the query runs.
1 parent 9920c6c commit 67c56c8

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

.tours/codeql-tutorial.tour

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"isPrimary": true,
55
"steps": [
66
{
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"]
912
},
1013
{
1114
"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."
1616
},
1717
{
1818
"file": "tutorial-queries/tutorial.ql",
@@ -21,12 +21,26 @@
2121
},
2222
{
2323
"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.",
2525
"pattern": "import tutorial.*"
2626
},
2727
{
2828
"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`.",
3044
"selection": {
3145
"start": {
3246
"line": 7,
@@ -40,7 +54,7 @@
4054
},
4155
{
4256
"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.",
4458
"selection": {
4559
"start": {
4660
"line": 7,

0 commit comments

Comments
 (0)