diff --git a/dist/index.js b/dist/index.js index f03395d..9c0fc47 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6512,10 +6512,9 @@ function diagnosticToString(diag, forCommand) { message += `${diag.file}:`; } if (diag.range && !isEmptyRange(diag.range)) { - message += `${diag.range.start.line + 1}:${diag.range.start.character + 1} - `; + message += `${diag.range.start.line + 1}:${diag.range.start.character + 1} -`; } - message += diag.severity; - message += `: `; + message += ` ${diag.severity}: `; } message += diag.message; if (diag.rule) { diff --git a/src/__snapshots__/main.test.ts.snap b/src/__snapshots__/main.test.ts.snap index 20b50a2..776bc3b 100644 --- a/src/__snapshots__/main.test.ts.snap +++ b/src/__snapshots__/main.test.ts.snap @@ -310,7 +310,7 @@ Array [ "/path/to/file1.py:1:1 - error: some error", ], Array [ - "/path/to/file2.py:warning: some warning", + "/path/to/file2.py: warning: some warning", ], Array [ "/path/to/file3.py:1:1 - information: some info (reportSomeInformation)", @@ -404,13 +404,13 @@ Array [ "/path/to/file1.py:1:1 - error: some error", ], Array [ - "/path/to/file2.py:warning: some warning", + "/path/to/file2.py: warning: some warning", ], Array [ "/path/to/file3.py:1:1 - information: some info (reportSomeInformation)", ], Array [ - "/path/to/file3.py:warning: another warning (reportSomeWarning)", + "/path/to/file3.py: warning: another warning (reportSomeWarning)", ], Array [ "/path/to/file1.py:6:10 - error: some error", diff --git a/src/main.ts b/src/main.ts index ddf3ca7..3b777ab 100644 --- a/src/main.ts +++ b/src/main.ts @@ -95,10 +95,9 @@ function diagnosticToString(diag: Diagnostic, forCommand: boolean): string { message += `${diag.file}:`; } if (diag.range && !isEmptyRange(diag.range)) { - message += `${diag.range.start.line + 1}:${diag.range.start.character + 1} - `; + message += `${diag.range.start.line + 1}:${diag.range.start.character + 1} -`; } - message += diag.severity; - message += `: `; + message += ` ${diag.severity}: `; } message += diag.message;