Skip to content

Commit 0360bf2

Browse files
Merge branch 'main' into robertbrignull/nightly-codeql
2 parents 66c0714 + f736adc commit 0360bf2

195 files changed

Lines changed: 16808 additions & 43245 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.

.github/dependabot.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@ updates:
77
day: "thursday" # Thursday is arbitrary
88
labels:
99
- "Update dependencies"
10-
ignore:
11-
- dependency-name: "*"
12-
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
1310
- package-ecosystem: "github-actions"
1411
directory: "/"
1512
schedule:
1613
interval: "weekly"
1714
day: "thursday" # Thursday is arbitrary
1815
labels:
1916
- "Update dependencies"
20-
ignore:
21-
- dependency-name: "*"
22-
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

.markdownlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"ul-style": {
3+
"style": "dash"
4+
},
25
"MD013": false,
36
"MD041": false
47
}

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
2626
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
3030
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
31+
- Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

3434
## Our Responsibilities
@@ -55,7 +55,7 @@ a project may be further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at opensource@github.com. All
58+
reported by contacting the project team at <opensource@github.com>. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ Please note that this project is released with a [Contributor Code of Conduct][c
2222

2323
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
2424

25-
* Follow the [style guide][style].
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).
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.
30-
* Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
25+
- Follow the [style guide][style].
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).
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.
30+
- Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
3131

3232
## Setting up a local build
3333

@@ -99,6 +99,6 @@ More information about Storybook can be found inside the **Overview** page once
9999

100100
## Resources
101101

102-
* [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
103-
* [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
104-
* [GitHub Help](https://help.github.com)
102+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
103+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
104+
- [GitHub Help](https://help.github.com)

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ To see what has changed in the last few versions of the extension, see the [Chan
1111

1212
## Features
1313

14-
* Enables you to use CodeQL to query databases and discover problems in codebases.
15-
* Shows the flow of data through the results of path queries, which is essential for triaging security results.
16-
* Provides an easy way to run queries from the large, open source repository of [CodeQL security queries](https://github.com/github/codeql).
17-
* Adds IntelliSense to support you writing and editing your own CodeQL query and library files.
18-
* Supports you running CodeQL queries against thousands of repositories on GitHub using multi-repository variant analysis.
14+
- Enables you to use CodeQL to query databases and discover problems in codebases.
15+
- Shows the flow of data through the results of path queries, which is essential for triaging security results.
16+
- Provides an easy way to run queries from the large, open source repository of [CodeQL security queries](https://github.com/github/codeql).
17+
- Adds IntelliSense to support you writing and editing your own CodeQL query and library files.
18+
- Supports you running CodeQL queries against thousands of repositories on GitHub using multi-repository variant analysis.
1919

2020
## Project goals and scope
2121

@@ -25,8 +25,8 @@ This project will track new feature development in CodeQL and, whenever appropri
2525

2626
This extension depends on the following two extensions for required functionality. They will be installed automatically when you install VS Code CodeQL.
2727

28-
* [Test Adapter Converter](https://marketplace.visualstudio.com/items?itemName=ms-vscode.test-adapter-converter)
29-
* [Test Explorer UI](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer)
28+
- [Test Adapter Converter](https://marketplace.visualstudio.com/items?itemName=ms-vscode.test-adapter-converter)
29+
- [Test Explorer UI](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer)
3030

3131
## Contributing
3232

docs/releasing.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# Releasing (write access required)
22

33
1. Determine the new version number. We default to increasing the patch version number, but make our own judgement about whether a change is big enough to warrant a minor version bump. Common reasons for a minor bump could include:
4-
* Making substantial new features available to all users. This can include lifting a feature flag.
5-
* Breakage in compatibility with recent versions of the CLI.
6-
* Minimum required version of VS Code is increased.
7-
* New telemetry events are added.
8-
* Deprecation or removal of commands.
9-
* 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.
4+
- Making substantial new features available to all users. This can include lifting a feature flag.
5+
- Breakage in compatibility with recent versions of the CLI.
6+
- Minimum required version of VS Code is increased.
7+
- New telemetry events are added.
8+
- Deprecation or removal of commands.
9+
- 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.
1010
1. Create a release branch named after the new version (e.g. `v1.3.6`):
11-
* For a regular scheduled release this branch will be based on latest `main`.
12-
* Make sure your local copy of `main` is up to date so you are including all changes.
13-
* To do a minimal bug-fix release, base the release branch on the tag from the most recent release and then add only the changes you want to release.
14-
* Choose this option if you want to release a specific set of changes (e.g. a bug fix) and don't want to incur extra risk by including other changes that have been merged to the `main` branch.
11+
- For a regular scheduled release this branch will be based on latest `main`.
12+
- Make sure your local copy of `main` is up to date so you are including all changes.
13+
- To do a minimal bug-fix release, base the release branch on the tag from the most recent release and then add only the changes you want to release.
14+
- Choose this option if you want to release a specific set of changes (e.g. a bug fix) and don't want to incur extra risk by including other changes that have been merged to the `main` branch.
1515

1616
```bash
1717
git checkout -b <new_release_branch> <previous_release_tag>
1818
```
1919

2020
1. Run the ["Run CLI tests" workflow](https://github.com/github/vscode-codeql/actions/workflows/cli-test.yml) and make sure the tests are green.
21-
* You can skip this step if you are releasing from `main` and there were no merges since the most recent daily scheduled run of this workflow.
21+
- You can skip this step if you are releasing from `main` and there were no merges since the most recent daily scheduled run of this workflow.
2222
1. Double-check the `CHANGELOG.md` contains all desired change comments and has the version to be released with date at the top.
23-
* Go through PRs that have been merged since the previous release and make sure they are properly accounted for.
24-
* Make sure all changelog entries have links back to their PR(s) if appropriate.
23+
- Go through PRs that have been merged since the previous release and make sure they are properly accounted for.
24+
- Make sure all changelog entries have links back to their PR(s) if appropriate.
2525
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.
2626
1. Commit any changes made during steps 4 and 5 with a commit message the same as the branch name (e.g. `v1.3.6`).
2727
1. Open a PR for this release.
28-
* The PR diff should contain:
29-
* Any missing bits from steps 4 and 5. Most of the time, this will just be updating `CHANGELOG.md` with today's date.
30-
* If releasing from a branch other than `main`, this PR will also contain the extension changes being released.
28+
- The PR diff should contain:
29+
- Any missing bits from steps 4 and 5. Most of the time, this will just be updating `CHANGELOG.md` with today's date.
30+
- If releasing from a branch other than `main`, this PR will also contain the extension changes being released.
3131
1. Build the extension using `npm run build` and install it on your VS Code using "Install from VSIX".
3232
1. Go through [our test plan](./test-plan.md) to ensure that the extension is working as expected.
3333
1. Create a new tag on the release branch with your new version (named after the release), e.g.
@@ -37,22 +37,22 @@
3737
```
3838
3939
1. Merge the release PR into `main`.
40-
* If there are conflicts in the changelog, make sure to place any new changelog entries at the top, above the section for the current release, as these new entries are not part of the current release and should be placed in the "unreleased" section.
41-
* The release PR must be merged before pushing the tag to ensure that we always release a commit that is present on the `main` branch. It's not required that the commit is the head of the `main` branch, but there should be no chance of a future release accidentally not including changes from this release.
40+
- If there are conflicts in the changelog, make sure to place any new changelog entries at the top, above the section for the current release, as these new entries are not part of the current release and should be placed in the "unreleased" section.
41+
- The release PR must be merged before pushing the tag to ensure that we always release a commit that is present on the `main` branch. It's not required that the commit is the head of the `main` branch, but there should be no chance of a future release accidentally not including changes from this release.
4242
1. Push the new tag up:
4343

4444
```bash
4545
git push origin refs/tags/v1.3.6
4646
```
4747

4848
1. Find the [Release](https://github.com/github/vscode-codeql/actions?query=workflow%3ARelease) workflow run that was just triggered by pushing the tag, and monitor the status of the release build.
49-
* DO NOT approve the "publish" stages of the workflow yet.
49+
- DO NOT approve the "publish" stages of the workflow yet.
5050
1. Download the VSIX from the draft GitHub release at the top of [the releases page](https://github.com/github/vscode-codeql/releases) that is created when the release build finishes.
5151
1. Unzip the `.vsix` and inspect its `package.json` to make sure the version is what you expect,
5252
or look at the source if there's any doubt the right code is being shipped.
5353
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).
5454
1. Approve the deployments of the [Release](https://github.com/github/vscode-codeql/actions?query=workflow%3ARelease) workflow run. This will automatically publish to Open VSX and VS Code Marketplace.
55-
* If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
55+
- If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
5656
1. Go to the draft GitHub release in [the releases page](https://github.com/github/vscode-codeql/releases), click 'Edit', add some summary description, and publish it.
5757
1. Confirm the new release is marked as the latest release.
5858
1. If documentation changes need to be published, notify documentation team that release has been made.

docs/testing.md

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

33
We have several types of tests:
44

5-
* Unit tests: these live in the `tests/unit-tests/` directory
6-
* View tests: these live in `src/view/variant-analysis/__tests__/`
7-
* VSCode integration tests:
8-
* `test/vscode-tests/activated-extension` tests: These are intended to cover functionality that require the full extension to be activated but don't require the CLI. This suite is not run against multiple versions of the CLI in CI.
9-
* `test/vscode-tests/no-workspace` tests: These are intended to cover functionality around not having a workspace. The extension is not activated in these tests.
10-
* `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.
11-
* CLI integration tests: these live in `test/vscode-tests/cli-integration`
12-
* These tests are intended to cover functionality that is related to the integration between the CodeQL CLI and the extension. These tests are run against each supported versions of the CLI in CI.
5+
- Unit tests: these live in the `tests/unit-tests/` directory
6+
- View tests: these live in `src/view/variant-analysis/__tests__/`
7+
- VSCode integration tests:
8+
- `test/vscode-tests/activated-extension` tests: These are intended to cover functionality that require the full extension to be activated but don't require the CLI. This suite is not run against multiple versions of the CLI in CI.
9+
- `test/vscode-tests/no-workspace` tests: These are intended to cover functionality around not having a workspace. The extension is not activated in these tests.
10+
- `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.
11+
- CLI integration tests: these live in `test/vscode-tests/cli-integration`
12+
- These tests are intended to cover functionality that is related to the integration between the CodeQL CLI and the extension. These tests are run against each supported versions of the CLI in CI.
1313

1414
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.
1515

@@ -26,9 +26,9 @@ Pre-requisites:
2626

2727
Then, from the `extensions/ql-vscode` directory, use the appropriate command to run the tests:
2828

29-
* Unit tests: `npm run test:unit`
30-
* View Tests: `npm run test:view`
31-
* VSCode integration tests: `npm run test:vscode-integration`
29+
- Unit tests: `npm run test:unit`
30+
- View Tests: `npm run test:view`
31+
- VSCode integration tests: `npm run test:vscode-integration`
3232

3333
#### Running CLI integration tests from the terminal
3434

@@ -48,9 +48,9 @@ Alternatively, you can run the tests inside of VSCode. There are several VSCode
4848

4949
You will need to run tests using a task from inside of VS Code, under the "Run and Debug" view:
5050

51-
* Unit tests: run the _Launch Unit Tests_ task
52-
* View Tests: run the _Launch Unit Tests - React_ task
53-
* VSCode integration tests: run the _Launch Unit Tests - No Workspace_ and _Launch Unit Tests - Minimal Workspace_ tasks
51+
- Unit tests: run the _Launch Unit Tests_ task
52+
- View Tests: run the _Launch Unit Tests - React_ task
53+
- VSCode integration tests: run the _Launch Unit Tests - No Workspace_ and _Launch Unit Tests - Minimal Workspace_ tasks
5454

5555
#### Running CLI integration tests from VSCode
5656

extensions/ql-vscode/CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## [UNRELEASED]
44

5+
- Add a prompt for downloading a GitHub database when opening a GitHub repository. [#3138](https://github.com/github/vscode-codeql/pull/3138)
6+
- Avoid showing a popup when hovering over source elements in database source files. [#3125](https://github.com/github/vscode-codeql/pull/3125)
7+
- Add comparison of alerts when comparing query results. This allows viewing path explanations for differences in alerts. [#3113](https://github.com/github/vscode-codeql/pull/3113)
8+
9+
## 1.11.0 - 13 December 2023
10+
11+
- Add a new method modeling panel to classify methods as sources/sinks/summaries while in the context of the source code. [#3128](https://github.com/github/vscode-codeql/pull/3128)
12+
- Adds the ability to add multiple classifications per method in the CodeQL Model Editor. [#3128](https://github.com/github/vscode-codeql/pull/3128)
13+
- Switch add and delete button positions in the CodeQL Model Editor. [#3123](https://github.com/github/vscode-codeql/pull/3123)
514
- Add a prompt to the "Quick query" command to encourage users in single-folder workspaces to use "Create query" instead. [#3082](https://github.com/github/vscode-codeql/pull/3082)
615
- Remove support for CodeQL CLI versions older than 2.11.6. [#3087](https://github.com/github/vscode-codeql/pull/3087)
716
- Preserve focus on results viewer when showing a location in a file. [#3088](https://github.com/github/vscode-codeql/pull/3088)
@@ -14,7 +23,7 @@
1423
- Add new CodeQL views for managing databases and queries:
1524
1. A queries panel that shows all queries in your workspace. It allows you to view, create, and run queries in one place.
1625
2. A language selector, which allows you to quickly filter databases and queries by language.
17-
26+
1827
For more information, see the [documentation](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#filtering-databases-and-queries-by-language).
1928
- When adding a CodeQL database, we no longer add the database source folder to the workspace by default (since this caused bugs in single-folder workspaces). [#3047](https://github.com/github/vscode-codeql/pull/3047)
2029
- You can manually add individual database source folders to the workspace with the "Add Database Source to Workspace" right-click command in the databases view.

0 commit comments

Comments
 (0)