mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
build: annotate markdown lint failures in pull requests
Add a problem matcher for output from remark-lint to our lint-md GitHub Actions CI workflow so that any markdown linter failures are annotated in the pull request in the web UI. Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/32391 Refs: https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md Refs: https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
This commit is contained in:
parent
f92df33832
commit
f467b9b5e2
4
.github/workflows/CI.yml
vendored
4
.github/workflows/CI.yml
vendored
@ -64,7 +64,9 @@ jobs:
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Lint docs
|
||||
run: NODE=$(which node) make lint-md
|
||||
run: |
|
||||
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
|
||||
NODE=$(which node) make lint-md
|
||||
lint-js:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
22
.github/workflows/remark-lint-problem-matcher.json
vendored
Normal file
22
.github/workflows/remark-lint-problem-matcher.json
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "remark-lint",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)*$",
|
||||
"file": 1
|
||||
},
|
||||
{
|
||||
"regexp": "^\\s+(?:\\d+:\\d+-)?(\\d+):(\\d+)\\s+\\S*(error|warning|info)\\S*\\s+(.+)\\s+(\\S+)\\s+(?:\\S+)$",
|
||||
"line": 1,
|
||||
"column": 2,
|
||||
"severity": 3,
|
||||
"message": 4,
|
||||
"code": 5,
|
||||
"loop": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user