0
0
Fork 0
mirror of https://github.com/DavidAnson/markdownlint-cli2-action.git synced 2024-11-23 22:56:22 +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 [ const [
, ,
file, file,
startLine, startLineString,
startColumn, startColumnString,
, ,
title title
] = match; ] = match;
const startLine = Number(startLineString);
annotation = { annotation = {
title, title,
file, file,
startLine, startLine
startColumn
}; };
if (startColumnString) {
// @ts-ignore
annotation.startColumn = Number(startColumnString);
}
} }
core.error(error, annotation); core.error(error, annotation);
}; };

View file

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