mirror of
https://github.com/github/codeql-action.git
synced 2026-04-05 03:02:16 +00:00
Just check the number of locations
Only tests the property we are looking for and avoids problems with different cross-platform behavior.
This commit is contained in:
4
.github/workflows/__diagnostics-export.yml
generated
vendored
4
.github/workflows/__diagnostics-export.yml
generated
vendored
@@ -95,10 +95,6 @@ jobs:
|
||||
if (n.locations.length !== 1) {
|
||||
core.setFailed(`Expected the status page diagnostic to have exactly 1 location, but found ${n.locations.length}.`);
|
||||
}
|
||||
const actualUri = n.locations[0].physicalLocation?.artifactLocation?.uri
|
||||
if (actualUri !== '/path/to/file') {
|
||||
core.setFailed(`Expected the status page diagnostic to have a location with the URI '/path/to/file', but found '${actualUri}'.`);
|
||||
}
|
||||
}
|
||||
|
||||
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||
|
||||
@@ -51,10 +51,6 @@ steps:
|
||||
if (n.locations.length !== 1) {
|
||||
core.setFailed(`Expected the status page diagnostic to have exactly 1 location, but found ${n.locations.length}.`);
|
||||
}
|
||||
const actualUri = n.locations[0].physicalLocation?.artifactLocation?.uri
|
||||
if (actualUri !== '/path/to/file') {
|
||||
core.setFailed(`Expected the status page diagnostic to have a location with the URI '/path/to/file', but found '${actualUri}'.`);
|
||||
}
|
||||
}
|
||||
|
||||
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
|
||||
|
||||
Reference in New Issue
Block a user