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:
parent
c3b2de4a57
commit
744f913a12
2 changed files with 16 additions and 8 deletions
12
dist/index.js
vendored
12
dist/index.js
vendored
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue