Skip to content

Commit ef14446

Browse files
committed
Merge branch 'main' of github.com:tjgurwara99/vscode-codeql
2 parents c72734e + 7f05af9 commit ef14446

290 files changed

Lines changed: 7990 additions & 3105 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

extensions/ql-vscode/.git-blame-ignore-revs renamed to .git-blame-ignore-revs

File renamed without changes.

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ updates:
1111
- dependency-name: "*"
1212
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
1313
- package-ecosystem: "github-actions"
14-
directory: ".github"
14+
directory: "/"
1515
schedule:
1616
interval: "weekly"
1717
day: "thursday" # Thursday is arbitrary

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
- name: 'Checkout Repository'
1414
uses: actions/checkout@v3
1515
- name: 'Dependency Review'
16-
uses: actions/dependency-review-action@v1
16+
uses: actions/dependency-review-action@v3

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
perl -i -pe 's/^/## \[UNRELEASED\]\n\n/ if($.==3)' CHANGELOG.md
117117
118118
- name: Create version bump PR
119-
uses: peter-evans/create-pull-request@c7f493a8000b8aeb17a1332e326ba76b57cb83eb # v3.4.1
119+
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3
120120
if: success()
121121
with:
122122
token: ${{ secrets.GITHUB_TOKEN }}

.vscode/launch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"args": [
4040
"--projects",
41-
"test"
41+
"test/unit-tests"
4242
],
4343
"stopOnEntry": false,
4444
"sourceMaps": true,
@@ -94,7 +94,7 @@
9494
"cwd": "${workspaceFolder}/extensions/ql-vscode",
9595
"args": [
9696
"--projects",
97-
"src/vscode-tests/no-workspace"
97+
"test/vscode-tests/no-workspace"
9898
],
9999
"sourceMaps": true,
100100
"console": "integratedTerminal",
@@ -110,7 +110,7 @@
110110
"cwd": "${workspaceFolder}/extensions/ql-vscode",
111111
"args": [
112112
"--projects",
113-
"src/vscode-tests/minimal-workspace"
113+
"test/vscode-tests/minimal-workspace"
114114
],
115115
"sourceMaps": true,
116116
"console": "integratedTerminal",
@@ -126,7 +126,7 @@
126126
"cwd": "${workspaceFolder}/extensions/ql-vscode",
127127
"args": [
128128
"--projects",
129-
"src/vscode-tests/cli-integration"
129+
"test/vscode-tests/cli-integration"
130130
],
131131
"env": {
132132
// Optionally, set the version to use for the integration tests.

CONTRIBUTING.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,17 @@ More information about Storybook can be found inside the **Overview** page once
9595

9696
We have several types of tests:
9797

98-
* Unit tests: these live in the `tests/pure-tests/` directory
98+
* Unit tests: these live in the `tests/unit-tests/` directory
9999
* View tests: these live in `src/view/variant-analysis/__tests__/`
100-
* VSCode integration tests: these live in `src/vscode-tests/no-workspace` and `src/vscode-tests/minimal-workspace`
101-
* CLI integration tests: these live in `src/vscode-tests/cli-integration`
100+
* VSCode integration tests:
101+
* `test/vscode-tests/no-workspace` tests: These are intended to cover functionality that is meant to work before you even have a workspace open.
102+
* `test/vscode-tests/minimal-workspace` tests: These are intended to cover functionality that need a workspace but don't require the full extension to be activated.
103+
* CLI integration tests: these live in `test/vscode-tests/cli-integration`
104+
* These tests are intendended to be cover functionality that is related to the integration between the CodeQL CLI and the extension.
102105

103106
The CLI integration tests require an instance of the CodeQL CLI to run so they will require some extra setup steps. When adding new tests to our test suite, please be mindful of whether they need to be in the cli-integration folder. If the tests don't depend on the CLI, they are better suited to being a VSCode integration test.
104107

105-
Any test data you're using (sample projects, config files, etc.) must go in a `src/vscode-tests/*/data` directory. When you run the tests, the test runner will copy the data directory to `out/vscode-tests/*/data`.
108+
Any test data you're using (sample projects, config files, etc.) must go in a `test/vscode-tests/*/data` directory. When you run the tests, the test runner will copy the data directory to `out/vscode-tests/*/data`.
106109

107110
#### Running the tests
108111

@@ -155,16 +158,16 @@ The CLI integration tests require the CodeQL standard libraries in order to run
155158
##### 1. From the terminal
156159

157160
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
158-
to only run tests for this specific file. For example, to run the test `src/vscode-tests/cli-integration/run-queries.test.ts`:
161+
to only run tests for this specific file. For example, to run the test `test/vscode-tests/cli-integration/run-queries.test.ts`:
159162

160163
```shell
161-
npm run cli-integration -- --runTestsByPath src/vscode-tests/cli-integration/run-queries.test.ts
164+
npm run cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts
162165
```
163166

164-
You can also use the `--testNamePattern` option to run a specific test within a file. For example, to run the test `src/vscode-tests/cli-integration/run-queries.test.ts`:
167+
You can also use the `--testNamePattern` option to run a specific test within a file. For example, to run the test `test/vscode-tests/cli-integration/run-queries.test.ts`:
165168

166169
```shell
167-
npm run cli-integration -- --runTestsByPath src/vscode-tests/cli-integration/run-queries.test.ts --testNamePattern "should create a QueryEvaluationInfo"
170+
npm run cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts --testNamePattern "should create a QueryEvaluationInfo"
168171
```
169172

170173
##### 2. From VSCode
@@ -221,6 +224,7 @@ Pre-recorded scenarios are stored in `./src/mocks/scenarios`. However, it's poss
221224

222225
## Releasing (write access required)
223226

227+
1. Go through [our test plan](/extensions/ql-vscode/docs/test-plan.md) to ensure that the extension is working as expected.
224228
1. Double-check the `CHANGELOG.md` contains all desired change comments and has the version to be released with date at the top.
225229
* Go through all recent PRs and make sure they are properly accounted for.
226230
* Make sure all changelog entries have links back to their PR(s) if appropriate.

extensions/ql-vscode/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
parserOptions: {
44
ecmaVersion: 2018,
55
sourceType: "module",
6-
project: ["tsconfig.json", "./src/**/tsconfig.json", "./gulpfile.ts/tsconfig.json", "./scripts/tsconfig.json", "./.storybook/tsconfig.json"],
6+
project: ["tsconfig.json", "./src/**/tsconfig.json", "./test/**/tsconfig.json", "./gulpfile.ts/tsconfig.json", "./scripts/tsconfig.json", "./.storybook/tsconfig.json"],
77
},
88
plugins: [
99
"github",

extensions/ql-vscode/.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ gulpfile.js/**
1414
tsconfig.json
1515
.prettierrc
1616
vsc-extension-quickstart.md
17+
node_modules/**
41.7 KB
Loading
24.2 KB
Loading

0 commit comments

Comments
 (0)