fixup the $schema in all .sarif files

This commit is contained in:
Erik Krogh Kristensen 2022-06-19 13:12:38 +02:00
Родитель 6e2f3e2fcb
Коммит 1856e2b389
2 изменённых файлов: 3 добавлений и 3 удалений

3
.github/workflows/ql-for-ql-build.yml поставляемый
Просмотреть файл

@ -192,6 +192,9 @@ jobs:
category: "ql-for-ql-${{ matrix.folder }}"
- name: Copy sarif file to CWD
run: cp ../results/ql.sarif ./${{ matrix.folder }}.sarif
- name: Fixup the $scema in sarif # Until https://github.com/microsoft/sarif-vscode-extension/pull/436/ is part in a stable release
run: |
sed -i 's/\$schema.*/\$schema": "https:\/\/raw.githubusercontent.com\/oasis-tcs\/sarif-spec\/master\/Schemata\/sarif-schema-2.1.0",/' ${{ matrix.folder }}.sarif
- name: Sarif as artifact
uses: actions/upload-artifact@v3
with:

Просмотреть файл

@ -18,9 +18,6 @@ async function main(files) {
out.runs[0].artifacts = []; // the indexes in these won't make sense, so I hope this works.
out.runs[0].results = combinedResults;
// workaround until https://github.com/microsoft/sarif-vscode-extension/pull/436/ is part of a release
out["$schema"] = "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0";
fs.writeFileSync(outFile, JSON.stringify(out, null, 2));
}
main(process.argv.splice(2));