Skip to content

Commit 23ff281

Browse files
Youssef1313BillWagner
authored andcommitted
Add markdownlint with GitHub actions (#1898)
* Add markdownlint with GitHub actions * Copy .markdownlint.json from docs * Update readme.md * Update readme.md * Update readme.md * Update and rename ReadMe.md to README.md * Update and rename ReadMe.md to README.md * Update README.md * Update README.md * Update README.md * Update readme.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Multiple fixes * Finish fixes * One missing leftover * Allow MD022 * Fix MD022 and enable MD004 * enable MD001 * enable MD009 * More fixes * More fixes * Fix MD009 * Enable MD013 * Some left-overs * Disable MD013 back, too much violations * Enable MD024 * Enable MD026 * Fix MD026 and enable MD028 * Enable some options in MD033 * Enable MD034 * Fix MD034
1 parent b593697 commit 23ff281

File tree

39 files changed

+384
-344
lines changed

39 files changed

+384
-344
lines changed

.github/workflows/markdownlint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Markdownlint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Use Node.js
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12.x
16+
- name: Run Markdownlint
17+
run: |
18+
npm i -g markdownlint-cli
19+
markdownlint "**/*.md"

.markdownlint.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD025": {
5+
"front_matter_title": ""
6+
},
7+
"MD033": {
8+
"allowed_elements": [
9+
"a",
10+
"kbd",
11+
"sup"
12+
]
13+
},
14+
"MD036": false,
15+
"MD040": false,
16+
"MD041": false,
17+
"MD046": {
18+
"style": "fenced"
19+
}
20+
}

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ to the organization of the docs for .NET. Some of the articles will have more th
77

88
The content team tracks issues for .NET documentation in the [dotnet/docs](https://github.com/dotnet/docs) and [dotnet/dotnet-api-docs](https://github.com/dotnet/dotnet-api-docs) repositories. Issues are turned off on this repository. File issues against existing samples and suggestions for new samples in those repositories. If you're not sure where, choose [dotnet/docs](https://github.com/dotnet/docs/issues). This process keeps the issues associated with the articles that explain the concepts for each sample. The best process is to file an issue from the feedback control at the bottom of each docs page:
99

10-
- For existing samples, file the issue on the page with the sample.
10+
- For existing samples, file the issue on the page with the sample.
1111
- To suggest new samples, file the issue on the index page where you want to see the new sample.
1212

1313
There are two classes of code in this repository:
@@ -26,7 +26,7 @@ project. Ideally, add tests for correctness on samples as well.
2626

2727
Snippets are extracted from small programs that include the snippet. Snippets are all located in the top level **/snippets** folder. While snippets are small blocks of code, we want to move toward snippets that are part of buildable sample projects.
2828

29-
## Building a snippet or sample
29+
## Building a snippet or sample
3030

3131
You build any .NET Core snippet or sample using the .NET Core CLI, which can be installed with [the .NET Core SDK](https://www.microsoft.com/net/download). Then, execute
3232
these commands from the CLI in the directory of any sample:
@@ -43,9 +43,9 @@ Multi-project samples have instructions in their root directory in
4343
a `README.md` file.
4444

4545
Except where noted, all samples build from the command line on
46-
any platform supported by .NET Core. There are a few samples that are
47-
specific to Visual Studio and require Visual Studio 2017 or later. In
48-
addition, some samples show platform-specific features and will require
46+
any platform supported by .NET Core. There are a few samples that are
47+
specific to Visual Studio and require Visual Studio 2017 or later. In
48+
addition, some samples show platform-specific features and will require
4949
a specific platform. Other samples and snippets require the .NET Framework
5050
and will run on Windows platforms, and will need the Developer Pack for
5151
the target Framework version.
@@ -90,7 +90,7 @@ To create a sample:
9090
}
9191
}
9292
```
93-
93+
9494
5. Don't check in the solution file if it contains only one project.
9595

9696
To build and run your sample:
@@ -100,12 +100,13 @@ To build and run your sample:
100100
```console
101101
dotnet build
102102
```
103+
103104
2. Run your sample:
104105

105106
```console
106107
dotnet run
107108
```
108109

109-
3. Add a *README.md* to the root directory of your sample.
110+
3. Add a *README.md* to the root directory of your sample.
110111

111112
This should include a brief description of the code, and refer people to the article that references the sample.

async/async-and-await/cs/readme.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: "Async Sample: Asynchronous Programming with Async and Await in C#"
99
urlFragment: "async-and-await-cs"
1010
description: "A .NET Core WPF application that contains the example method from Asynchronous Progamming with Async and Await in C#."
1111
---
12-
# Async programming with async and await in C#
12+
# Async programming with async and await in C\#
1313

1414
This sample is a WPF application written in C# that contains the example method from [Task asynchronous programming model](https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/async/task-asynchronous-programming-model). The article gives an overview of asynchronous programming, including when to use it and how to write an async method. This sample contains an async function that is used as an illustration.
1515

@@ -27,22 +27,22 @@ This sample is written in C# and targets .NET Core 3.0 running on Windows. It re
2727

2828
To download and run the sample, follow these steps:
2929

30-
1. Download and unzip the sample.
31-
32-
2. In Visual Studio (2019 or later):
33-
30+
1. Download and unzip the sample.
31+
32+
2. In Visual Studio (2019 or later):
33+
3434
1. On the menu bar, choose **File** > **Open** > **Project/Solution**.
35-
35+
3636
2. Navigate to the folder that holds the unzipped sample code, and open the c# project (.csproj) file.
37-
37+
3838
3. Choose the <kbd>F5</kbd> key to run with debugging, or <kbd>Ctrl</kbd>+<kbd>F5</kbd> keys to run the project without debugging.
3939

4040
3. From the command line:
4141

4242
1. Navigate to the folder that holds the unzipped sample code.
43-
43+
4444
2. At the command line, type `dotnet run`.
45-
46-
## More Information
47-
48-
- https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/async/
45+
46+
## More information
47+
48+
- <https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/async/>

async/async-and-await/vb/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ To download and run the sample, follow these steps:
4545

4646
## More information
4747

48-
- https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/async/index
48+
- <https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/async/index>

core/console-apps/NewTypesMsBuild/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dotnet test
2525

2626
`dotnet test` runs the configured tests.
2727

28-
`dotnet build` will follow the dependency on the `NewTypesMsBuild` project and build both the app and unit tests projects. It implicitly runs `dotnet restore` on .NET Core 2.0 and later versions. If you're using .NET Core 1.0 or .NET Core 1.1, you first have to run `dotnet restore` yourself.
28+
`dotnet build` will follow the dependency on the `NewTypesMsBuild` project and build both the app and unit tests projects. It implicitly runs `dotnet restore` on .NET Core 2.0 and later versions. If you're using .NET Core 1.0 or .NET Core 1.1, you first have to run `dotnet restore` yourself.
2929

3030
<a name="dotnet-restore-note"></a>
3131
**Note:** Starting with .NET Core 2.0 SDK, you don't have to run [`dotnet restore`](https://docs.microsoft.com/dotnet/core/tools/dotnet-restore) because it's run implicitly by all commands that require a restore to occur, such as `dotnet new`, `dotnet build` and `dotnet run`. It's still a valid command in certain scenarios where doing an explicit restore makes sense, such as [continuous integration builds in Azure DevOps Services](https://docs.microsoft.com/azure/devops/build-release/apps/aspnet/build-aspnet-core) or in build systems that need to explicitly control the time at which the restore occurs.

core/encoding/cyrillic-to-latin/cs/readme.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ name: ".NET Core Cyrillic to Latin Transliteration Utility (C#)"
88
urlFragment: "cyrillic-transliteration-cs"
99
description: "A .NET Core console application written in C# that uses the encoding fallback functionality to transliterate Cyrillic to Latin characters."
1010
---
11-
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12-
to their Latin equivalents. It uses a modified Library of Congress system for
11+
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12+
to their Latin equivalents. It uses a modified Library of Congress system for
1313
transliteration. Its syntax is:
1414

1515
```
@@ -20,24 +20,24 @@ where *sourceFile* is the path and filename of a text file that contains modern
2020
characters, and *destinationFile* is the name of the text file that will store the
2121
original text with its Cyrillic characters replaced by transliterated Latin characters.
2222
If a file path is included in *destinationFile* and any portion of that path does
23-
not exist, the utility terminates.
23+
not exist, the utility terminates.
2424

2525
The specific mappings of upper- and lower-case Cyrillic characters
26-
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
26+
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
2727
class, where the entries of a case mapping table named `table` are defined.
2828

29-
The utility illustrates the extensibility of character encoding in the .NET
30-
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31-
responsible for translating a sequence of characters into a sequence of bytes. The
29+
The utility illustrates the extensibility of character encoding in the .NET
30+
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31+
responsible for translating a sequence of characters into a sequence of bytes. The
3232
decoder is responsible for translating the sequence of bytes into a sequence of
3333
characters. .NET Core supports ASCII as well as the standard Unicode
3434
encodings and allows the [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) class to be overridden to support otherwise
35-
unsupported encodings. It also allows an encoder and a decoder's handling of
35+
unsupported encodings. It also allows an encoder and a decoder's handling of
3636
unmapped characters and bytes to be customized. Broadly, an encoder or a decoder can handle data that it cannot map by throwing an exception or by using some alternate mapping. For more information, see [Character Encoding in .NET Framework](https://docs.microsoft.com/dotnet/standard/base-types/character-encoding).
3737

3838
The transliteration utility works by instantiating an [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) object that represents ASCII encoding, which supports ASCII characters in the range from U+00 to U+FF. Because modern Cyrillic characters occupy the range from U+0410 to U+044F, they do not automatically map to ASCII encoding. When the utility instantiates its Encoding object, it passes its constructor an instance of a class named `CyrillicToLatinFallback` that is derived from [EncoderFallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback). This class maintains an internal table that maps modern Cyrillic characters to one or more Latin characters.
3939

4040
When the encoder encounters a character that it cannot encode, it calls the fallback
41-
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
41+
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
4242
the modern Cyrillic character mapping table. It then passes the `CyrillicToLatinFallbackBuffer`
43-
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.
43+
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.

core/encoding/cyrillic-to-latin/vb/readme.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ name: ".NET Core Cyrillic to Latin Transliteration Utility (Visual Basic)"
88
urlFragment: "cyrillic-transliteration-vb"
99
description: "A .NET Core console application written in Visual Basic that uses the encoding fallback functionality to transliterate Cyrillic to Latin characters."
1010
---
11-
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12-
to their Latin equivalents. It uses a modified Library of Congress system for
11+
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12+
to their Latin equivalents. It uses a modified Library of Congress system for
1313
transliteration. Its syntax is:
1414

1515
```
@@ -20,24 +20,24 @@ where *sourceFile* is the path and filename of a text file that contains modern
2020
characters, and *destinationFile* is the name of the text file that will store the
2121
original text with its Cyrillic characters replaced by transliterated Latin characters.
2222
If a file path is included in *destinationFile* and any portion of that path does
23-
not exist, the utility terminates.
23+
not exist, the utility terminates.
2424

2525
The specific mappings of upper- and lower-case Cyrillic characters
26-
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
26+
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
2727
class, where the entries of a case mapping table named `table` are defined.
2828

29-
The utility illustrates the extensibility of character encoding in the .NET
30-
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31-
responsible for translating a sequence of characters into a sequence of bytes. The
29+
The utility illustrates the extensibility of character encoding in the .NET
30+
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31+
responsible for translating a sequence of characters into a sequence of bytes. The
3232
decoder is responsible for translating the sequence of bytes into a sequence of
3333
characters. .NET Core supports ASCII as well as the standard Unicode
3434
encodings and allows the [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) class to be overridden to support otherwise
35-
unsupported encodings. It also allows an encoder and a decoder's handling of
35+
unsupported encodings. It also allows an encoder and a decoder's handling of
3636
unmapped characters and bytes to be customized. Broadly, an encoder or a decoder can handle data that it cannot map by throwing an exception or by using some alternate mapping. For more information, see [Character Encoding in .NET Framework](https://docs.microsoft.com/dotnet/standard/base-types/character-encoding).
3737

3838
The transliteration utility works by instantiating an [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) object that represents ASCII encoding, which supports ASCII characters in the range from U+00 to U+FF. Because modern Cyrillic characters occupy the range from U+0410 to U+044F, they do not automatically map to ASCII encoding. When the utility instantiates its Encoding object, it passes its constructor an instance of a class named `CyrillicToLatinFallback` that is derived from [EncoderFallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback). This class maintains an internal table that maps modern Cyrillic characters to one or more Latin characters.
3939

4040
When the encoder encounters a character that it cannot encode, it calls the fallback
41-
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
41+
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
4242
the modern Cyrillic character mapping table. It then passes the `CyrillicToLatinFallbackBuffer`
43-
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.
43+
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,40 @@
1-
COM Server Demo
2-
================
1+
# COM Server Demo
32

43
This is a basic example of providing a managed COM server in .NET Core 3.0. Documentation on the inner workings of activation can be found [here](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/COM-activation.md).
54

6-
Key Features
7-
------------
5+
## Key Features
86

97
Demonstrates how to provide a COM server in .NET Core 3.0 Preview 7 or later.
108

119
Additional comments are contained in source and project files.
1210

13-
Build and Run
14-
-------------
11+
## Build and Run
1512

1613
The project will only build and run on the Windows platform. You can build and run the example either by registering the COM server or by using registration-free COM.
1714

18-
### Registered COM ###
15+
### Registered COM
1916

20-
1) Install .NET Core 3.0 Preview 7 or later.
17+
1. Install .NET Core 3.0 Preview 7 or later.
2118

22-
1) Navigate to the root directory and run `dotnet.exe build`.
19+
1. Navigate to the root directory and run `dotnet.exe build`.
2320

24-
1) Follow the instructions for COM server registration that were emitted during the build.
21+
1. Follow the instructions for COM server registration that were emitted during the build.
2522

26-
1) Navigate to `COMClient/` and run `dotnet.exe run`.
23+
1. Navigate to `COMClient/` and run `dotnet.exe run`.
2724

2825
Program should output an estimated value of &#960;.
2926

3027
**Note** Remember to unregister the COM server when the demo is complete.
3128

32-
### RegFree COM ###
29+
### RegFree COM
3330

34-
1) Install .NET Core 3.0 Preview 7 or later.
31+
1. Install .NET Core 3.0 Preview 7 or later.
3532

36-
1) Navigate to the root directory and run `dotnet.exe build /p:RegFree=True`.
33+
1. Navigate to the root directory and run `dotnet.exe build /p:RegFree=True`.
3734

3835
- If the Registered COM demo was previously run, the project should be cleaned first - `dotnet.exe clean`
3936

40-
1) Run the generated binary directly. For example, `COMClient\bin\Debug\netcoreapp3.0\COMClient.exe`.
37+
1. Run the generated binary directly. For example, `COMClient\bin\Debug\netcoreapp3.0\COMClient.exe`.
4138

4239
Program should output an estimated value of &#960;.
4340

0 commit comments

Comments
 (0)