Move sarif-utils.ts to /common

This commit is contained in:
Robert
2023-06-21 09:38:09 +01:00
parent b11a675004
commit 655adfcd51
7 changed files with 9 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ import { QueryEvaluationInfo } from "../run-queries-shared";
import {
parseSarifLocation,
parseSarifPlainTextMessage,
} from "../pure/sarif-utils";
} from "../common/sarif-utils";
import { WebviewReveal, fileUriToWebviewUri } from "./webview";
import {
tryResolveLocation,

View File

@@ -1,7 +1,10 @@
import { CellValue } from "../common/bqrs-cli-types";
import { tryGetRemoteLocation } from "../common/bqrs-utils";
import { createRemoteFileRef } from "../common/location-link-utils";
import { parseHighlightedLine, shouldHighlightLine } from "../pure/sarif-utils";
import {
parseHighlightedLine,
shouldHighlightLine,
} from "../common/sarif-utils";
import { convertNonPrintableChars } from "../pure/text-utils";
import type {
AnalysisAlert,

View File

@@ -3,7 +3,7 @@ import {
parseHighlightedLine,
parseSarifPlainTextMessage,
parseSarifRegion,
} from "../pure/sarif-utils";
} from "../common/sarif-utils";
import {
AnalysisAlert,

View File

@@ -5,7 +5,7 @@ import { HighlightedRegion } from "../../../variant-analysis/shared/analysis-res
import {
parseHighlightedLine,
shouldHighlightLine,
} from "../../../pure/sarif-utils";
} from "../../../common/sarif-utils";
const replaceSpaceAndTabChar = (text: string) =>
text.replaceAll(" ", "\u00a0").replaceAll("\t", "\u00a0\u00a0\u00a0\u00a0");

View File

@@ -26,7 +26,7 @@ import {
parseSarifPlainTextMessage,
parseSarifLocation,
isNoLocation,
} from "../../pure/sarif-utils";
} from "../../common/sarif-utils";
import { vscode } from "../vscode-api";
import { isWholeFileLoc, isLineColumnLoc } from "../../common/bqrs-utils";
import { ScrollIntoViewHelper } from "./scroll-into-view-helper";

View File

@@ -5,7 +5,7 @@ import {
parseSarifLocation,
parseSarifPlainTextMessage,
unescapeSarifText,
} from "../../../src/pure/sarif-utils";
} from "../../../src/common/sarif-utils";
describe("parsing sarif", () => {
it("should be able to parse a simple message from the spec", async () => {