Use markdownlint GitHub action (#1507)

This commit is contained in:
Amaury Levé 2022-12-22 11:38:23 +01:00 коммит произвёл GitHub
Родитель 5491aeac74
Коммит 1b52349c5b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 57 добавлений и 16 удалений

17
.github/workflows/markdownlint-problem-matcher.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"pattern": [
{
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}

29
.github/workflows/markdownlint.yml поставляемый Normal file
Просмотреть файл

@ -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"

Просмотреть файл

@ -28,5 +28,5 @@ There are many ways to contribute:
## Coding Style
The MSTest project follows the same rules as runtime repository [developer guide](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/coding-style.md).
The repository includes [.editorconfig](http://editorconfig.org) files to help enforce this convention.
The repository includes [.editorconfig](http://editorconfig.org) files to help enforce this convention.
Contributors should ensure they follow these guidelines when making submissions.

Просмотреть файл

@ -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

Просмотреть файл

@ -7,7 +7,7 @@
## Summary
This details the MSTest V2 framework extensibility for attributes that are traits for a test.
This details the MSTest V2 framework extensibility for attributes that are traits for a test.
## Motivation
@ -94,7 +94,7 @@ Users can then filter tests in VS IDE Test Explorer based on this Test Property.
Trait:"CustomTraitProperty" Trait:"234"
```
This would provide extension writers with the same level of functionality that TestProperty already has with filtering and reporting plus the added ease of having a strongly typed trait.
This would provide extension writers with the same level of functionality that TestProperty already has with filtering and reporting plus the added ease of having a strongly typed trait.
### Requirements from Test Platform

Просмотреть файл

@ -7,7 +7,7 @@
## Summary
This details the MSTest V2 framework extensibility for extending the Assert class to add custom assertions.
This details the MSTest V2 framework extensibility for extending the Assert class to add custom assertions.
## Motivation