File tree Expand file tree Collapse file tree 3 files changed +48
-2
lines changed Expand file tree Collapse file tree 3 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 18
18
"reportUnusedDisableDirectives" : true ,
19
19
"rules" : {
20
20
"indent" : [" error" , 2 ],
21
+ "function-call-argument-newline" : " off" ,
21
22
"one-var" : " off" ,
23
+ "padded-blocks" : " off" ,
24
+ "prefer-named-capture-group" : " off" ,
22
25
"sort-keys" : " off" ,
23
26
24
27
"node/handle-callback-err" : " error" ,
59
62
"node/prefer-promises/dns" : " error" ,
60
63
"node/prefer-promises/fs" : " error" ,
61
64
65
+ "unicorn/no-unsafe-regex" : " off" ,
62
66
"unicorn/prefer-module" : " off" ,
63
67
"unicorn/prefer-top-level-await" : " off"
64
68
}
Original file line number Diff line number Diff line change @@ -31663,7 +31663,28 @@ const core = __nccwpck_require__(2186);
31663
31663
const {"main": markdownlintCli2} = __nccwpck_require__(9247);
31664
31664
31665
31665
const logMessage = core.info;
31666
- const logError = core.error;
31666
+ const logError = (error) => {
31667
+ // eslint-disable-next-line init-declarations
31668
+ let annotation;
31669
+ const match = error.match(/^([^:]+):(\d+)(?::(\d+))?\s(\S+)\s(.+)$/u);
31670
+ if (match) {
31671
+ const [
31672
+ ,
31673
+ file,
31674
+ startLine,
31675
+ startColumn,
31676
+ ,
31677
+ title
31678
+ ] = match;
31679
+ annotation = {
31680
+ title,
31681
+ file,
31682
+ startLine,
31683
+ startColumn
31684
+ };
31685
+ }
31686
+ core.error(error, annotation);
31687
+ };
31667
31688
const argv =
31668
31689
core.getInput("globs").
31669
31690
split("\n").
Original file line number Diff line number Diff line change @@ -6,7 +6,28 @@ const core = require("@actions/core");
6
6
const { "main" : markdownlintCli2 } = require ( "markdownlint-cli2" ) ;
7
7
8
8
const logMessage = core . info ;
9
- const logError = core . error ;
9
+ const logError = ( error ) => {
10
+ // eslint-disable-next-line init-declarations
11
+ let annotation ;
12
+ const match = error . match ( / ^ ( [ ^ : ] + ) : ( \d + ) (?: : ( \d + ) ) ? \s ( \S + ) \s ( .+ ) $ / u) ;
13
+ if ( match ) {
14
+ const [
15
+ ,
16
+ file ,
17
+ startLine ,
18
+ startColumn ,
19
+ ,
20
+ title
21
+ ] = match ;
22
+ annotation = {
23
+ title,
24
+ file,
25
+ startLine,
26
+ startColumn
27
+ } ;
28
+ }
29
+ core . error ( error , annotation ) ;
30
+ } ;
10
31
const argv =
11
32
core . getInput ( "globs" ) .
12
33
split ( "\n" ) .
You can’t perform that action at this time.
0 commit comments