You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CODE_OF_CONDUCT.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,10 +67,7 @@ members of the project's leadership.
67
67
68
68
## Attribution
69
69
70
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
-
73
-
[homepage]: https://www.contributor-covenant.org
70
+
This Code of Conduct is adapted from the [Contributor Covenant, version 1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
74
71
75
72
For answers to common questions about this code of conduct, see
76
-
https://www.contributor-covenant.org/faq
73
+
[the Contributor Covenant FAQ](https://www.contributor-covenant.org/faq). For more about Contributor Covenant, see [the Contributor Covenant website](https://www.contributor-covenant.org).
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,9 @@ Please note that this project is released with a [Contributor Code of Conduct][c
23
23
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
24
24
25
25
* Follow the [style guide][style].
26
-
* Write tests. Tests that don't require the VS Code API are located [here](extensions/ql-vscode/test). Integration tests that do require the VS Code API are located [here](extensions/ql-vscode/src/vscode-tests).
26
+
* Write tests:
27
+
*[Tests that don't require the VS Code API are located here](extensions/ql-vscode/test).
28
+
*[Integration tests that do require the VS Code API are located here](extensions/ql-vscode/src/vscode-tests).
27
29
* Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
28
30
* Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
29
31
@@ -93,7 +95,7 @@ More information about Storybook can be found inside the **Overview** page once
93
95
94
96
### Testing
95
97
96
-
Information about testing can be found [here](./docs/testing.md).
98
+
[Information about testing can be found here](./docs/testing.md).
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@ This project will track new feature development in CodeQL and, whenever appropri
25
25
26
26
This extension depends on the following two extensions for required functionality. They will be installed automatically when you install VS Code CodeQL.
Copy file name to clipboardExpand all lines: docs/releasing.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@
12
12
* Accumulation of many changes, none of which are individually big enough to warrant a minor bump, but which together are. This does not include changes which are purely internal to the extension, such as refactoring, or which are only available behind a feature flag.
13
13
1. Double-check that the node version we're using matches the one used for VS Code. If it doesn't, you will then need to update the node version in the following files:
14
14
*`.nvmrc` - this will enable `nvm` to automatically switch to the correct node version when you're in the project folder
15
-
*`.github/workflows/main.yml` - all the "node-version: <version>" settings
16
-
*`.github/workflows/release.yml` - the "node-version: <version>" setting
15
+
*`.github/workflows/main.yml` - all the "node-version: '[VERSION]'" settings
16
+
*`.github/workflows/release.yml` - the "node-version: '[VERSION]'" setting
17
17
1. Double-check that the extension `package.json` and `package-lock.json` have the version you intend to release. If you are doing a patch release (as opposed to minor or major version) this should already be correct.
18
18
1. Create a PR for this release:
19
19
* This PR will contain any missing bits from steps 1, 2 and 3. Most of the time, this will just be updating `CHANGELOG.md` with today's date.
@@ -22,23 +22,26 @@
22
22
* Create a PR for this branch.
23
23
* Wait for the PR to be merged into `main`
24
24
1. Switch to `main` branch and pull latest changes
25
-
1. Lock the `main` branch.
25
+
1. Lock the `main` branch.
26
26
* Go to the [branch protection rules for the `main` branch](https://github.com/github/vscode-codeql/settings/branch_protection_rules/16447115)
27
27
* Select "Lock branch"
28
28
* Click "Save changes"
29
29
1. Ensure that no PRs have been merged since the release PR that you merged. If there were, you might need to unlock `main` temporarily and update the CHANGELOG again.
30
30
1. Build the extension `npm run build` and install it on your VS Code using "Install from VSIX".
31
31
1. Go through [our test plan](./test-plan.md) to ensure that the extension is working as expected.
32
32
1. Switch to `main` and add a new tag on the `main` branch with your new version (named after the release), e.g.
33
+
33
34
```bash
34
35
git checkout main
35
36
git tag v1.3.6
36
37
```
37
38
38
39
If you've accidentally created a badly named tag, you can delete it via
39
-
```bash
40
-
git tag -d badly-named-tag
41
-
```
40
+
41
+
```bash
42
+
git tag -d badly-named-tag
43
+
```
44
+
42
45
1. Unlock the main branch
43
46
* Go to the [branch protection rules for the `main` branch](https://github.com/github/vscode-codeql/settings/branch_protection_rules/16447115)
44
47
* Deselect "Lock branch"
@@ -68,7 +71,7 @@
68
71
or look at the source if there's any doubt the right code is being shipped.
69
72
1. Install the `.vsix` file into your vscode IDE and ensure the extension can load properly. Run a single command (like run query, or add database).
70
73
1. Go to the actions tab of the vscode-codeql repository and selectthe [Release workflow](https://github.com/github/vscode-codeql/actions?query=workflow%3ARelease).
71
-
- If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
74
+
* If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
72
75
1. Approve the deployments of the correct Release workflow. This will automatically publish to Open VSX and VS Code Marketplace.
73
76
1. Go to the draft GitHub release in [the releases tab of the repository](https://github.com/github/vscode-codeql/releases), click 'Edit', add some summary description, and publish it.
74
77
1. Confirm the new release is marked as the latest release at <https://github.com/github/vscode-codeql/releases>.
Copy file name to clipboardExpand all lines: docs/testing.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ Any test data you're using (sample projects, config files, etc.) must go in a `t
18
18
## Running the tests
19
19
20
20
Pre-requisites:
21
+
21
22
1. Run `npm run build`.
22
23
2. You will need to have `npm run watch` running in the background.
23
24
@@ -29,7 +30,7 @@ Then, from the `extensions/ql-vscode` directory, use the appropriate command to
29
30
* View Tests: `npm test:view`
30
31
* VSCode integration tests: `npm run test:vscode-integration`
31
32
32
-
#### CLI integration tests
33
+
#### Running CLI integration tests from the terminal
33
34
34
35
The CLI integration tests require the CodeQL standard libraries in order to run so you will need to clone a local copy of the `github/codeql` repository.
35
36
@@ -51,7 +52,7 @@ You will need to run tests using a task from inside of VS Code, under the "Run a
51
52
* View Tests: run the _Launch Unit Tests_ task
52
53
* VSCode integration tests: run the _Launch Unit Tests - No Workspace_ and _Launch Unit Tests - Minimal Workspace_ tasks
53
54
54
-
#### CLI integration tests
55
+
#### Running CLI integration tests from VSCode
55
56
56
57
The CLI integration tests require the CodeQL standard libraries in order to run so you will need to clone a local copy of the `github/codeql` repository.
57
58
@@ -63,7 +64,7 @@ The CLI integration tests require the CodeQL standard libraries in order to run
63
64
64
65
## Running a single test
65
66
66
-
### 1. From the terminal
67
+
### 1. Running a single test from the terminal
67
68
68
69
The easiest way to run a single test is to change the `it` of the test to `it.only` and then run the test command with some additional options
69
70
to only run tests for this specific file. For example, to run the test `test/vscode-tests/cli-integration/run-queries.test.ts`:
@@ -78,7 +79,7 @@ You can also use the `--testNamePattern` option to run a specific test within a
78
79
npm run test:cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts --testNamePattern "should create a QueryEvaluationInfo"
79
80
```
80
81
81
-
### 2. From VSCode
82
+
### 2. Running a single test from VSCode
82
83
83
84
Alternatively, you can run a single test inside VSCode. To do so, install the [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) extension. Then,
84
85
you will have quicklinks to run a single test from within test files. To run a single unit or integration test, click the "Run" button. Debugging a single test is currently only supported
@@ -94,7 +95,9 @@ Multi-Repo Variant Analyses (MRVA) rely on the GitHub API. In order to make deve
94
95
### Using a pre-recorded test scenario
95
96
96
97
To run a mock MRVA scenario, follow these steps:
98
+
97
99
1. Enable the mock GitHub API server by adding the following in your VS Code user settings (which can be found by running the `Preferences: Open User Settings (JSON)` VS Code command):
100
+
98
101
```json
99
102
"codeQL.mockGitHubApiServer": {
100
103
"enabled": true
@@ -108,9 +111,11 @@ To run a mock MRVA scenario, follow these steps:
108
111
If you want to replay the same scenario you should unload and reload it so requests are replayed from the start.
109
112
110
113
### Recording a new test scenario
114
+
111
115
To record a new mock MRVA scenario, follow these steps:
112
116
113
117
1. Enable the mock GitHub API server by adding the following in your VS Code user settings (which can be found by running the `Preferences: Open User Settings (JSON)` VS Code command):
0 commit comments