Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 81183ca

Browse filesBrowse files
richardlauMylesBorins
authored andcommitted
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: #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>
1 parent 4ca3030 commit 81183ca
Copy full SHA for 81183ca

File tree

Expand file treeCollapse file tree

2 files changed

+25
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+25
-1
lines changed
Open diff view settings
Collapse file

‎.github/workflows/CI.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/CI.yml
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ jobs:
6464
with:
6565
node-version: 10.x
6666
- name: Lint docs
67-
run: NODE=$(which node) make lint-md
67+
run: |
68+
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
69+
NODE=$(which node) make lint-md
6870
lint-js:
6971
runs-on: ubuntu-latest
7072
steps:
Collapse file
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "remark-lint",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)*$",
8+
"file": 1
9+
},
10+
{
11+
"regexp": "^\\s+(?:\\d+:\\d+-)?(\\d+):(\\d+)\\s+\\S*(error|warning|info)\\S*\\s+(.+)\\s+(\\S+)\\s+(?:\\S+)$",
12+
"line": 1,
13+
"column": 2,
14+
"severity": 3,
15+
"message": 4,
16+
"code": 5,
17+
"loop": true
18+
}
19+
]
20+
}
21+
]
22+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.