0
0
Fork 0
mirror of https://github.com/DavidAnson/markdownlint-cli2-action.git synced 2024-12-24 05:43:33 +01:00

Convert annotation properties startLine/startColumn to the correct type, omit if not present.

fix
This commit is contained in:
David Anson 2022-02-05 17:09:56 -08:00
parent c3b2de4a57
commit 744f913a12
2 changed files with 16 additions and 8 deletions

12
dist/index.js vendored
View file

@ -31671,17 +31671,21 @@ const logError = (error) => {
const [
,
file,
startLine,
startColumn,
startLineString,
startColumnString,
,
title
] = match;
const startLine = Number(startLineString);
annotation = {
title,
file,
startLine,
startColumn
startLine
};
if (startColumnString) {
// @ts-ignore
annotation.startColumn = Number(startColumnString);
}
}
core.error(error, annotation);
};

View file

@ -14,17 +14,21 @@ const logError = (error) => {
const [
,
file,
startLine,
startColumn,
startLineString,
startColumnString,
,
title
] = match;
const startLine = Number(startLineString);
annotation = {
title,
file,
startLine,
startColumn
startLine
};
if (startColumnString) {
// @ts-ignore
annotation.startColumn = Number(startColumnString);
}
}
core.error(error, annotation);
};