Skip to content

Commit 6292adf

Browse files
authored
Merge branch 'main' into fix-db-remove
2 parents 112d40f + b92d6ba commit 6292adf

Some content is hidden

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

67 files changed

+3307
-1512
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build Extension
22
on:
33
workflow_dispatch:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
push:
67
branches:
78
- main
@@ -50,12 +51,30 @@ jobs:
5051
name: vscode-codeql-extension
5152
path: artifacts
5253

54+
find-nightly:
55+
name: Find Nightly Release
56+
runs-on: ubuntu-latest
57+
outputs:
58+
url: ${{ steps.get-url.outputs.nightly-url }}
59+
steps:
60+
- name: Get Nightly Release URL
61+
id: get-url
62+
env:
63+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
64+
shell: bash
65+
# This workflow step gets an unstable testing version of the CodeQL CLI. It should not be used outside of these tests.
66+
run: |
67+
LATEST=`gh api repos/dsp-testing/codeql-cli-nightlies/releases --jq '.[].tag_name' --method GET --raw-field 'per_page=1'`
68+
echo "::set-output name=nightly-url::https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST"
69+
5370
test:
5471
name: Test
5572
runs-on: ${{ matrix.os }}
73+
needs: [find-nightly]
5674
strategy:
5775
matrix:
5876
os: [ubuntu-latest, windows-latest]
77+
version: [stable, nightly]
5978
steps:
6079
- name: Checkout
6180
uses: actions/checkout@v2
@@ -88,7 +107,12 @@ jobs:
88107
- name: Install CodeQL
89108
run: |
90109
mkdir codeql-home
91-
curl -L --silent https://github.com/github/codeql-cli-binaries/releases/latest/download/codeql.zip -o codeql-home/codeql.zip
110+
if [ ${{ matrix.version }} = "stable" ]
111+
then
112+
curl -L --silent https://github.com/github/codeql-cli-binaries/releases/latest/download/codeql.zip -o codeql-home/codeql.zip
113+
else
114+
curl -L --silent ${{ needs.find-nightly.outputs.url }}/codeql.zip -o codeql-home/codeql.zip
115+
fi
92116
unzip -q -o codeql-home/codeql.zip -d codeql-home
93117
unzip -q -o codeql-home/codeql.zip codeql/codeql.exe -d codeql-home
94118
rm codeql-home/codeql.zip
@@ -123,12 +147,14 @@ jobs:
123147
cli-test:
124148
name: CLI Test
125149
runs-on: ${{ matrix.os }}
150+
needs: [find-nightly]
126151
strategy:
127152
matrix:
128153
os: [ubuntu-latest, windows-latest]
129-
version: ['v2.2.6', 'v2.3.3', 'v2.4.5', 'v2.4.6', 'v2.5.5']
154+
version: ['v2.3.3', 'v2.4.6', 'v2.5.9', 'v2.6.3', 'nightly']
130155
env:
131156
CLI_VERSION: ${{ matrix.version }}
157+
NIGHTLY_URL: ${{ needs.find-nightly.outputs.url }}
132158
TEST_CODEQL_PATH: '${{ github.workspace }}/codeql'
133159

134160
steps:
@@ -151,10 +177,26 @@ jobs:
151177
npm run build
152178
shell: bash
153179

180+
- name: Decide on ref of CodeQL repo
181+
id: choose-ref
182+
shell: bash
183+
run: |
184+
if [[ "${{ matrix.version }}" == "nightly" ]]
185+
then
186+
REF="codeql-cli/latest"
187+
elif [[ "${{ matrix.version }}" == "v2.2.6" || "${{ matrix.version }}" == "v2.3.3" ]]
188+
then
189+
REF="codeql-cli/v2.4.5"
190+
else
191+
REF="codeql-cli/${{ matrix.version }}"
192+
fi
193+
echo "::set-output name=ref::$REF"
194+
154195
- name: Checkout QL
155196
uses: actions/checkout@v2
156197
with:
157198
repository: github/codeql
199+
ref: ${{ steps.choose-ref.outputs.ref }}
158200
path: codeql
159201

160202
- name: Run CLI tests (Linux)

.github/workflows/release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
name: Release
88
on:
9-
pull_request:
10-
paths:
11-
- '**/workflows/release.yml'
12-
139
workflow_dispatch:
1410

1511
push:
@@ -129,6 +125,7 @@ jobs:
129125
body: This PR was automatically generated by the GitHub Actions release workflow in this repository.
130126
branch: ${{ format('version/bump-to-{0}', steps.bump-patch-version.outputs.next_version) }}
131127
base: main
128+
draft: true
132129

133130
vscode-publish:
134131
name: Publish to VS Code Marketplace

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"common/temp": true,
2323
"**/.vscode-test": true
2424
},
25-
"typescript.tsdk": "./common/temp/node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
25+
"typescript.tsdk": "./extensions/ql-vscode/node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
26+
"typescript.enablePromptUseWorkspaceTsdk": true,
2627
"eslint.validate": [
2728
"javascript",
2829
"javascriptreact",

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/* @github/codeql-vscode-reviewers

extensions/ql-vscode/.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ module.exports = {
2222
},
2323
],
2424
"@typescript-eslint/explicit-function-return-type": "off",
25+
"@typescript-eslint/explicit-module-boundary-types": "off",
2526
"@typescript-eslint/no-non-null-assertion": "off",
2627
"@typescript-eslint/no-explicit-any": "off",
28+
"@typescript-eslint/no-floating-promises": [ "error", { ignoreVoid: true } ],
2729
"prefer-const": ["warn", { destructuring: "all" }],
2830
indent: "off",
2931
"@typescript-eslint/indent": "off",

extensions/ql-vscode/CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,48 @@
22

33
## [UNRELEASED]
44

5+
- Add progress messages to LGTM download option. This makes the two-step process (selecting a project, then selecting a language) more clear. [#960](https://github.com/github/vscode-codeql/pull/960)
6+
- Remove line about selecting a language from the dropdown when downloading database from LGTM. This makes the download progress visible when the popup is not expanded. [#957](https://github.com/github/vscode-codeql/pull/957)
7+
- Fixed a bug where copying the version information fails when a CodeQL CLI cannot be found. [#958](https://github.com/github/vscode-codeql/pull/958)
8+
- Avoid a race condition when deleting databases that can cause occasional errors. [#959](https://github.com/github/vscode-codeql/pull/959)
9+
10+
## 1.5.5 - 08 September 2021
11+
12+
- Fix bug where a query is sometimes run before the file is saved. [#947](https://github.com/github/vscode-codeql/pull/947)
13+
- Fix broken contextual queries, including _View AST_. [#949](https://github.com/github/vscode-codeql/pull/949)
14+
15+
## 1.5.4 - 02 September 2021
16+
17+
- Add support for filename pattern in history view. [#930](https://github.com/github/vscode-codeql/pull/930)
18+
- Add an option _View Results (CSV)_ to view the results of a non-alert query. The existing options for alert queries have been renamed to _View Alerts_ to avoid confusion. [#929](https://github.com/github/vscode-codeql/pull/929)
19+
- Allow users to specify the number of paths to display for each alert. [#931](https://github.com/github/vscode-codeql/pull/931)
20+
- Adjust pagination controls in _CodeQL Query Results_ to always be visible [#936](https://github.com/github/vscode-codeql/pull/936)
21+
- Fix bug where _View AST_ fails due to recent refactoring in the standard library and query packs. [#939](https://github.com/github/vscode-codeql/pull/939)
22+
23+
## 1.5.3 - 18 August 2021
24+
25+
- Add a command _CodeQL: Run Query on Multiple Databases_, which lets users select multiple databases to run a query on. [#898](https://github.com/github/vscode-codeql/pull/898)
26+
- Autodetect what language a query targets. This refines the _CodeQL: Run Query on Multiple Databases_ command to only show relevant databases. [#915](https://github.com/github/vscode-codeql/pull/915)
27+
- Adjust test log output to display diffs only when comparing failed test results with expected test results. [#920](https://github.com/github/vscode-codeql/pull/920)
28+
29+
## 1.5.2 - 13 July 2021
30+
31+
- Add the _Add Database Source to Workspace_ command to the right-click context menu in the databases view. This lets users re-add a database's source folder to the workspace and browse the source code. [#891](https://github.com/github/vscode-codeql/pull/891)
32+
- Fix markdown rendering in the description of the `codeQL.cli.executablePath` setting. [#908](https://github.com/github/vscode-codeql/pull/908)
33+
- Fix the _Open Query Results_ command in the query history view. [#909](https://github.com/github/vscode-codeql/pull/909)
34+
35+
## 1.5.1 - 23 June 2021
36+
37+
No user facing changes.
38+
39+
## 1.5.0 - 14 June 2021
40+
541
- Display CodeQL CLI version being downloaded during an upgrade. [#862](https://github.com/github/vscode-codeql/pull/862)
642
- Display a helpful message and link to documentation when a query produces no results. [#866](https://github.com/github/vscode-codeql/pull/866)
743
- Refresh test databases automatically after a test run. [#868](https://github.com/github/vscode-codeql/pull/868)
844
- Allow users to specify a custom directory for storing query server logs (`codeQL.runningQueries.customLogDirectory`). The extension will not delete these logs automatically. [#863](https://github.com/github/vscode-codeql/pull/863)
9-
- Avoid a race condition when deleting databases that can cause occasional errors. [#959](https://github.com/github/vscode-codeql/pull/959)
45+
- Support the VS Code [Workspace Trust feature](https://code.visualstudio.com/docs/editor/workspace-trust). This extension is now enabled in untrusted workspaces, but it restricts commands that contain arbitrary paths. [#861](https://github.com/github/vscode-codeql/pull/861)
46+
- Allow the `codeQL.cli.executablePath` configuration setting to be set in workspace-scoped configuration files. This means that each workspace can now specify its own CodeQL CLI compiler, a feature that is unblocked due to implementing Workspace Trust. [#861](https://github.com/github/vscode-codeql/pull/861)
1047

1148
## 1.4.8 - 05 May 2021
1249

-468 KB
Loading
Lines changed: 4 additions & 14 deletions
Loading

0 commit comments

Comments
 (0)