зеркало из https://github.com/microsoft/testfx.git
Use markdownlint GitHub action (#1507)
This commit is contained in:
Родитель
5491aeac74
Коммит
1b52349c5b
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "markdownlint",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
name: Markdownlint
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/*.md"
|
||||
- ".markdownlint.json"
|
||||
- ".github/workflows/markdownlint.yml"
|
||||
- ".github/workflows/markdownlint-problem-matcher.json"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
- name: Run Markdownlint
|
||||
run: |
|
||||
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
|
||||
npm i -g markdownlint-cli
|
||||
markdownlint "**/*.md"
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD009": {
|
||||
"br_spaces": 0
|
||||
},
|
||||
"MD013": false,
|
||||
"MD046": {
|
||||
"style": "fenced"
|
||||
|
|
|
@ -14,8 +14,10 @@ pr:
|
|||
exclude:
|
||||
- .github/*
|
||||
- .devcontainer/*
|
||||
- CODE-OF-CONDUCT.md
|
||||
- LICENSE
|
||||
- docs/*
|
||||
- CODE_OF_CONDUCT.md
|
||||
- CONTRIBUTING.md
|
||||
- README.md
|
||||
- SECURITY.md
|
||||
|
||||
parameters:
|
||||
|
@ -234,13 +236,3 @@ stages:
|
|||
SkipLocProjectJsonGeneration: true
|
||||
GitHubOrg: microsoft
|
||||
MirrorRepo: testfx
|
||||
|
||||
- ${{ if eq(variables._RunAsPublic, True) }}:
|
||||
- job: Markdownlint
|
||||
pool:
|
||||
vmImage: ubuntu-22.04
|
||||
steps:
|
||||
- script: sudo npm install -g markdownlint-cli@0.32.2
|
||||
displayName: Install markdownlint-cli
|
||||
- script: markdownlint '**/*.md'
|
||||
displayName: Run markdownlint
|
||||
|
|
Загрузка…
Ссылка в новой задаче