Skip to content

Commit f033560

Browse files
Add markdown linter GH action (#4539)
* Add markdown linter GH action * Update .github/workflows/markdownlint.yml * Update .github/workflows/markdownlint.yml
1 parent 3d42eb6 commit f033560

File tree

11 files changed

+78
-30
lines changed

11 files changed

+78
-30
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "markdownlint",
5+
"pattern": [
6+
{
7+
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"code": 4,
12+
"message": 5
13+
}
14+
]
15+
}
16+
]
17+
}

.github/workflows/markdownlint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: markdownlint
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- "**/*.md"
10+
- ".markdownlint.json"
11+
- ".github/workflows/markdownlint.yml"
12+
- ".github/workflows/markdownlint-problem-matcher.json"
13+
14+
jobs:
15+
lint:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: lts/*
25+
- name: Run Markdownlint
26+
run: |
27+
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
28+
npm i -g markdownlint-cli
29+
markdownlint "**/*.md"

.markdownlint.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"default": true,
3+
"MD013": false, // 80 char line length
4+
"MD033": false, // no inline HTML
5+
}

Documentation/VMR-re-bootstrapping.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ as [Arcade](https://github.com/dotnet/arcade). Re-bootstrapping is the term used
66
toolset need to be updated. This document describes the steps to re-bootstrap
77
the VMR.
88

9-
# When is it appropriate to re-bootstrap?
9+
## When is it appropriate to re-bootstrap?
1010

1111
As part of the release process, the toolset is updated (e.g. PRs are created via
1212
the release automation). Outside of a release, re-bootstrapping is only permitted
@@ -17,7 +17,7 @@ and time consuming process for them to re-bootstrap. It is likely to cause
1717
significant delays in the release/availability of .NET within the distros that are
1818
source built.
1919

20-
# Why is re-bootstrap necessary?
20+
## Why is re-bootstrap necessary?
2121

2222
Re-bootstrapping is necessary when .NET takes a dependency on new functionality
2323
added within the bootstrap toolset. For example suppose a new compiler feature is
@@ -26,9 +26,9 @@ would be necessary. The implication of this, and the restrictions of when
2626
re-bootstrapping is allowed, means that repos should, in general, wait to take a
2727
dependency on a new toolset feature until after that feature has been released.
2828

29-
# Steps to re-bootstrap
29+
## Steps to re-bootstrap
3030

31-
## Automated
31+
### Automated
3232

3333
> [!IMPORTANT]
3434
> The re-bootstrap pipeline uploads the artifacts to the official blob storage,
@@ -38,21 +38,22 @@ dependency on a new toolset feature until after that feature has been released.
3838
You can re-bootstrap the VMR using [this pipeline](https://dev.azure.com/dnceng/internal/_build?definitionId=1371).
3939
The pipeline will upload the artifacts & open the corresponding re-bootstrap PR.
4040

41-
## Manual
41+
### Manual
42+
4243
In case the automated re-bootstrapping pipeline is unavailable, you can manually re-bootstrap the VMR:
4344

4445
1. Update previous source-build artifacts
4546
1. Find a [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219) run
4647
with the desired changes.
47-
1. If a rebootstrap is needed quickly and it is not feasibly to wait for a
48+
1. If a rebootstrap is needed quickly and it is not feasibly to wait for a
4849
[dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219) run,
49-
you can also use the artifacts from a
50+
you can also use the artifacts from a
5051
[dotnet-source-build-lite](https://dev.azure.com/dnceng/internal/_build?definitionId=1299) run.
5152
1. Retrieve the built SDKs and private source-built artifacts archives, from the following legs:
5253
1. Alpine\<nnn\>_Online_MsftSdk_x64
5354
1. CentOSStream\<n\>_Online_MsftSdk_x64
54-
1. Upload the SDKs to https://dotnetcli.blob.core.windows.net/source-built-artifacts/sdks/
55-
1. Upload the private source-built artifacts archives to https://dotnetcli.blob.core.windows.net/source-built-artifacts/assets/
55+
1. Upload the SDKs to the [source build sdk blob storage](https://dotnetcli.blob.core.windows.net/source-built-artifacts/sdks/)
56+
1. Upload the private source-built artifacts archives to the [source build assets blob storage](https://dotnetcli.blob.core.windows.net/source-built-artifacts/assets/)
5657
1. Update .NET SDK
5758
1. Find the [dotnet-sdk-official-ci](https://dev.azure.com/dnceng/internal/_build?definitionId=140) build
5859
that best matches the dotnet-source-build. The following is the suggested

Documentation/bootstrapping-guidelines.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Building .NET for the first time is a two stage process:
5757
```bash
5858
./prep-source-build.sh --no-sdk --no-artifacts --with-sdk <extracted-stage1-sdk-path> --with-packages <extracted-stage1-artifacts-path>
5959
60-
6160
1. Build the source built .NET SDK.
6261
6362
``` bash

Documentation/package-dependency-flow.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ability to service the product.
4242

4343
## Package Versions
4444

45-
Package dependencies defined using
45+
Package dependencies defined using
4646
[Arcade's dependency patterns](https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md)
4747
will get lifted dynamically during a source build if the following conditions are met:
4848

@@ -87,7 +87,7 @@ containing updated version properties for all non-pinned dependencies.
8787

8888
**PackageVersions.Previous.props:** This will contain version properties with the
8989
package versions from the [previous release of source build](#previous-source-built-packages).
90-
If a new package exists that has never been released before, it will not have a
90+
If a new package exists that has never been released before, it will not have a
9191
version property defined.
9292

9393
```xml
@@ -110,19 +110,19 @@ property defined.
110110
These two version.props files get imported by the arcade source build infrastructure after
111111
the repo's Version.props file. Therefore the repo's Versions.props property versions
112112
get overridden by the source build versions. In the case of the `SystemCommandLineVersion`
113-
example, the current source build version, 2.0.0-beta4, would win. All msbuild references
114-
(e.g. project PackageReferences) to these Versions.props properties pick up the newer
113+
example, the current source build version, 2.0.0-beta4, would win. All msbuild references
114+
(e.g. project PackageReferences) to these Versions.props properties pick up the newer
115115
versions. This is known as package version lifting since it lifts the originally defined
116116
package version to the current source built version. This behavior only applies to source
117-
build in the context of the [VMR](https://github.com/dotnet/dotnet) (see also
117+
build in the context of the [VMR](https://github.com/dotnet/dotnet) (see also
118118
[Repo Level Source Builds](#repo-level-source-builds)).
119119

120120
### Transitive Version Properties
121121

122122
Transitive version properties in your Versions.props file may not work as intended with
123123
source build.
124124

125-
**Versions.props**
125+
#### Versions.props
126126

127127
```xml
128128
...
@@ -131,7 +131,7 @@ source build.
131131
...
132132
```
133133

134-
**Version.Details.xml**
134+
#### Version.Details.xml
135135

136136
```xml
137137
...
@@ -151,11 +151,10 @@ for source build, then you either need to declare the Microsoft.Build dependency
151151
in the Version.Details.xml file or move the `MicrosoftBuildVersion` assignment outside
152152
of the Versions.props file.
153153

154-
155154
### Repo Level Source Builds
156155

157156
The source build package lifting mechanism is not applicable when building individual
158157
repos in source build mode because it doesn't have the context of the other product
159158
repos or previous source build release. In repo source build mode, the versions of the
160-
packages declared in the Versions.props are used (see also
159+
packages declared in the Versions.props are used (see also
161160
[backlog issue](https://github.com/dotnet/source-build/issues/3562)).

Documentation/planning/arcade-powered-source-build/in-arcade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ the non-Microsoft repo. This wraps it without forking the original repo's
135135
history. The intent would be very clear. However, it would be more difficult to
136136
maintain patches, if any are necessary to add Arcade.
137137

138-
[intermediate nupkg]: intermediate-nupkg.md
138+
[intermediate nupkg]: intermediate-nupkg.md

Documentation/planning/arcade-powered-source-build/incremental-official.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ creates a tree of cached builds.
88
The following diagram is the source-build intermediate output flow in 3.1, with
99
leaf nodes colored gold and the Core-SDK (dotnet/installer) product at the top:
1010

11-
> ![](img/official-leaves.svg)
11+
> ![Source build leaves](img/official-leaves.svg)
1212
> [source (img/official-leaves.dot)](img/official-leaves.dot)
1313
1414
To build up the tree of cached builds, source-build must be distributed amongst

Documentation/planning/arcade-powered-source-build/source-build-in-pipeline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos.
77

88
## Official build
99

10-
> ![](img/rough-pipeline-official.png)
10+
> ![Official builds](img/rough-pipeline-official.png)
1111
> Blue: Existing
1212
> Black: Source-build additions.
1313
@@ -27,7 +27,7 @@ other official builds.
2727

2828
## PR validation and rolling builds
2929

30-
> ![](img/rough-pipeline-validate.png)
30+
> ![Pipeline validation](img/rough-pipeline-validate.png)
3131
> Blue: Existing.
3232
> Black: Basic source-build. Always validate.
3333
> Green: Extra validation steps (necessary coverage per repo varies).

Documentation/planning/arcade-powered-source-build/speculative-build.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ machines).
2020

2121
## How to orchestrate a speculative build
2222

23-
> ![](img/spec-build-1-general.png)
23+
> ![Speculative build](img/spec-build-1-general.png)
2424
2525
The red circle is the current build. For example, dotnet/aspnetcore on `master`.
2626
The black circles are the builds that were used for intermediates.
@@ -40,7 +40,7 @@ local build outputs. This gives us a speculative SDK as an output.
4040

4141
## Validation: speculative bootstrap
4242

43-
> ![](img/spec-build-2-bootstrap.png)
43+
> ![Speculative bootstrap](img/spec-build-2-bootstrap.png)
4444
> (The big arrow means *from* and/or *to* many nodes.)
4545
4646
We can use the output SDK and intermediates from our bootstrap build to try to
@@ -49,7 +49,7 @@ successful, we have validated the bootstrap build scenario.
4949

5050
## Validation: speculative N-1
5151

52-
> ![](img/spec-build-3-n-1.png)
52+
> ![Speculative N-1](img/spec-build-3-n-1.png)
5353
> (The big arrow means *from* and/or *to* many nodes.)
5454
5555
If we instead use the output SDK and intermediates from an N-1 build, instead of

0 commit comments

Comments
 (0)