Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions extensions/ql-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [UNRELEASED]

- Remove support for CodeQL CLI versions older than 2.22.4. [#4344](https://github.com/github/vscode-codeql/pull/4344)
- Fix location links being displayed for query results with empty `file:///` URI [#4357](https://github.com/github/vscode-codeql/pull/4357)

## 1.17.7 - 5 December 2025

Expand Down
2 changes: 1 addition & 1 deletion extensions/ql-vscode/src/common/bqrs-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { isUrlValueResolvable } from "./raw-result-types";
* as a link.
*/
export function isEmptyPath(uriStr: string) {
return !uriStr || uriStr === "file:/";
return !uriStr || uriStr === "file:/" || uriStr === "file:///";
}

export function tryGetRemoteLocation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
} from "../../../src/common/bqrs-raw-results-mapper";
import type {
BqrsResultSetSchema,
BqrsWholeFileLocation,
DecodedBqrsChunk,
} from "../../../src/common/bqrs-cli-types";
import { ColumnKind } from "../../../src/common/raw-result-types";
Expand Down Expand Up @@ -319,4 +320,18 @@ describe("mapUrlValue", () => {
});
}
});

it("should return undefined for empty file uri", () => {
for (const fileUri of ["file:/", "file:///"]) {
const loc = {
uri: fileUri,
startLine: 0,
startColumn: 0,
endLine: 0,
endColumn: 0,
} as BqrsWholeFileLocation;
const urlValue = mapUrlValue(loc);
expect(urlValue).toBeUndefined();
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,20 @@ describe("fileRangeFromURI", () => {
});

it("should return undefined when value is an empty uri", () => {
expect(
fileRangeFromURI(
{
uri: "file:/",
startLine: 1,
startColumn: 2,
endLine: 3,
endColumn: 4,
} as BqrsLineColumnLocation,
createMockDatabaseItem(),
),
).toBeUndefined();
for (const fileUri of ["file:/", "file:///"]) {
expect(
fileRangeFromURI(
{
uri: fileUri,
startLine: 1,
startColumn: 2,
endLine: 3,
endColumn: 4,
} as BqrsLineColumnLocation,
createMockDatabaseItem(),
),
).toBeUndefined();
}
});

it("should return a range for a WholeFileLocation", () => {
Expand Down