Skip to content

Commit 8b5b4ae

Browse files
committed
fix: MD031/blanks-around-fences
Fenced code blocks should be surrounded by blank lines
1 parent 1bcff52 commit 8b5b4ae

File tree

66 files changed

+197
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+197
-47
lines changed

.markdownlint.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"MD028": false,
2222
"MD029": false,
2323
"MD030": false,
24-
"MD031": false,
2524
"MD032": false,
2625
"MD033": {
2726
"allowed_elements": [

docs/ai/installation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Deep learning frameworks rely on pip for their own installation.
8181
Then, we need to verify whether Python 3.5 is installed correctly, and upgrade pip to the latest version by executing the following commands in a terminal:
8282

8383
- **Windows**
84+
8485
```cmd
8586
C:\Users\test>python -V
8687
Python 3.5.4
@@ -92,6 +93,7 @@ Then, we need to verify whether Python 3.5 is installed correctly, and upgrade p
9293
```
9394
9495
- **macOS**
96+
9597
```bash
9698
MyMac:~ test$ python3.5 -V
9799
Python 3.5.4
@@ -153,10 +155,13 @@ Visit [here](https://caffe2.ai/docs/getting-started.html) to build from source c
153155
To install MXNet, run the following command in a terminal:
154156

155157
- With GPU
158+
156159
```bash
157160
pip3.5 install mxnet-cu80==0.12.0
158161
```
162+
159163
- Without GPU
164+
160165
```bash
161166
pip3.5 install mxnet==0.12.0
162167
```

docs/azure/vs-azure-tools-diagnostics-for-cloud-services-and-virtual-machines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ If you're using Azure SDK 2.5 and want to specify a custom data source, you can
148148
<DataSource name="CustomDataSource!*" />
149149
</WindowsEventLog>
150150
```
151+
151152
### Performance counters
152153
Performance counter information can help you locate system bottlenecks and fine-tune system and application performance. For more information, see [Create and use performance counters in an Azure application](https://msdn.microsoft.com/library/azure/hh411542.aspx). To capture performance counters, select the **Enable transfer of Performance Counters** check box. To increase or decrease the interval between the transfer of event logs to your storage account, change the **Transfer Period (min)** value. Select the check boxes for the performance counters that you want to track.
153154

docs/azure/vs-azure-tools-optimizing-azure-code-in-visual-studio.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ while (true)
209209
}
210210
}
211211
```
212+
212213
## Consider using asynchronous Service Bus methods
213214
### ID
214215
AP2003

docs/azure/vs-azure-tools-resource-groups-ci.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ The following procedures walk you through the steps necessary to configure conti
166166
```
167167
-_artifactsLocation $(artifactsLocation) -_artifactsLocationSasToken (ConvertTo-SecureString -String "$(artifactsLocationSasToken)" -AsPlainText -Force)
168168
```
169+
169170
![Configure Azure Resource Group Deployment Task](media/vs-azure-tools-resource-groups-ci-in-vsts/walkthrough18.png)
170171
7. After you’ve added all the required items, save the build pipeline and choose **Queue new build** at the top.
171172

docs/code-quality/C26404.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Once owner pointer releases or transfers its resource, it gets into an "invalid"
1818
Deleting such a pointer may lead to immediate memory corruption due to double delete, or to an access violation when the deleted resource is accessed from another owner pointer.
1919

2020
## Example 1: Deleting an owner after transferring its value
21+
2122
```cpp
2223
gsl::owner<State*> validState = nullptr;
2324
gsl::owner<State*> state = ReadState();
@@ -27,6 +28,7 @@ if (!IsValid(state))
2728
```
2829

2930
## Example 2: Deleting an uninitialized owner
31+
3032
```cpp
3133
gsl::owner<Message*> message;
3234
if (popLast)

docs/code-quality/C26405.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ms.workload:
1717
If an owner pointer already points to a valid memory buffer, it must not be assigned to another value without releasing its current resource first. Such assignment may lead to a resource leak even if the resource address is copied into some raw pointer (because raw pointers shouldn’t release resources).
1818

1919
## Example 1: Overwriting an owner in a loop
20+
2021
```cpp
2122
gsl::owner<Shape*> shape = nullptr;
2223
while (shape = NextShape()) // C26405

docs/code-quality/C26406.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ms.workload:
1717
Owners are initialized from allocations or from other owners. Assigning a value from a raw pointer to an owner pointer is not allowed. Raw pointers don’t guarantee ownership transfer; there is still may be an original owner which holds the resource and will attempt to release it. Note that assigning a value from owner to a raw pointer is fine; raw pointers are valid clients to access resources, but not to manage them.
1818

1919
## Example 1: Using address of object
20+
2021
```cpp
2122
gsl::owner<Socket*> socket = defaultSocket ? &defaultSocket : new Socket(); // C26406
2223
```

docs/code-quality/C26407.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,31 @@ To avoid unnecessary use of pointers we try to detect common patterns of local a
2323
- The pattern is detected only for local variables, so we don’t warn on cases where an allocation is assigned to, say, a global variable and then deleted in the same function.
2424

2525
## Example 1: Unnecessary object allocation on heap
26+
2627
```cpp
2728
auto tracer = new Tracer();
2829
ScanObjects(tracer);
2930
delete tracer; // C26407
3031
```
3132
3233
## Example 2: Unnecessary object allocation on heap (fixed with local object)
34+
3335
```cpp
3436
Tracer tracer; // OK
3537
ScanObjects(&tracer);
3638
```
3739

3840
## Example 3: Unnecessary buffer allocation on heap
41+
3942
```cpp
4043
auto value = new char[maxValueSize];
4144
if (ReadSetting(name, value, maxValueSize))
4245
CheckValue(value);
4346
delete[] value; // C26407
4447
```
48+
4549
## Example 4: Unnecessary buffer allocation on the heap (fixed with container)
50+
4651
```cpp
4752
auto value = std::vector<char>(maxValueSize); // OK
4853
if (ReadSetting(name, value.data(), maxValueSize))

docs/code-quality/C26410.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Generally, references to const unique pointer are meaningless. They can safely b
2121
- Template code may produce a lot of noise. Keep in mind that templates can be instantiated with various type parameters with different levels of indirection, including references. Some warnings may not be obvious and fixes may require some rework of templates (for example, explicit removal of reference indirection). If template code is intentionally generic, the warning can be suppressed.
2222

2323
## Example 1: Unnecessary reference
24+
2425
```cpp
2526
std::vector<std::unique_ptr<Tree>> roots = GetRoots();
2627
std::for_each(

docs/code-quality/C26450.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ int multiply()
3030
return c;
3131
}
3232
```
33+
3334
To correct this warning, use the following code.
3435

3536
```cpp
@@ -53,6 +54,7 @@ int add()
5354
return c;
5455
}
5556
```
57+
5658
To correct this warning, use the following code:
5759

5860
```cpp
@@ -64,6 +66,7 @@ long long add()
6466
return c;
6567
}
6668
```
69+
6770
## Example 3
6871

6972
```cpp
@@ -75,6 +78,7 @@ int subtract()
7578
return c;
7679
}
7780
```
81+
7882
To correct this warning, use the following code.
7983

8084
```cpp

docs/code-quality/C26451.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ void leftshift(int i)
3030
// code
3131
}
3232
```
33+
3334
To correct this warning, use the following code:
3435
3536
```cpp
@@ -41,6 +42,7 @@ void leftshift(int i)
4142
// code
4243
}
4344
```
45+
4446
## Example 2
4547

4648
```cpp

docs/code-quality/C26452.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ unsigned __int64 combine(unsigned lo, unsigned hi)
2626
return (hi << 32) | lo; // C26252 here
2727
}
2828
```
29+
2930
To correct this warning, use the following code:
3031
3132
```cpp

docs/code-quality/C26454.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ unsigned int negativeunsigned()
2626
return x;
2727
}
2828
```
29+
2930
To correct this warning, use the following code:
3031

3132
```cpp

docs/code-quality/c28112.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ inter_var --;
3030
...
3131
InterlockedIncrement(&inter_var);
3232
```
33+
3334
The following code example avoids this warning:
3435
3536
```cpp

docs/code-quality/ca2301-do-not-call-binaryformatter-deserialize-without-first-setting-binaryformatter-binder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ End Class
114114
```
115115

116116
### Solution
117+
117118
```csharp
118119
using System;
119120
using System.IO;

docs/code-quality/ca2302-ensure-binaryformatter-binder-is-set-before-calling-binaryformatter-deserialize.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ End Class
117117
```
118118

119119
### Solution
120+
120121
```csharp
121122
using System;
122123
using System.IO;

docs/data-tools/add-code-to-datasets-in-n-tier-applications.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ By default, after you separate the dataset and TableAdapter code, the result is
4747
' to the CustomersDataTable.
4848
End Class
4949
```
50+
5051
```csharp
5152
partial class CustomersDataTable
5253
{

docs/data-tools/add-validation-to-an-n-tier-dataset.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ End Sub
6767
End If
6868
End If
6969
```
70+
7071
```csharp
7172
// Add this code to the DataTable partial class.
7273

@@ -130,6 +131,7 @@ End Sub
130131
End Sub
131132
End Class
132133
```
134+
133135
```csharp
134136
partial class OrdersDataTable
135137
{

docs/data-tools/create-a-simple-data-application-by-using-adonet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ To complete the NewCustomer form logic, follow these steps.
174174
```csharp
175175
using System.Data.SqlClient;
176176
```
177+
177178
```vb
178179
Imports System.Data.SqlClient
179180
```
@@ -206,6 +207,7 @@ To complete the FillOrCancel form logic, follow these steps.
206207
using System.Data.SqlClient;
207208
using System.Text.RegularExpressions;
208209
```
210+
209211
```vb
210212
Imports System.Data.SqlClient
211213
Imports System.Text.RegularExpressions

docs/debugger/how-to-run-the-worker-process-under-a-user-account.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ To set up your computer so that you can run the [!INCLUDE[vstecasp](../code-qual
5454
```cmd
5555
iisreset
5656
```
57+
5758
— or —
5859

5960
```cmd

docs/debugger/using-breakpoints.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ To visually trace breakpoints during code execution, see [Map methods on the cal
141141
```C++
142142
((my_class *) 0xcccccccc)->my_method
143143
```
144+
144145
::: moniker range=">= vs-2019"
145146

146147
## <a name="BKMK_set_a_data_breakpoint_managed"></a>Set data breakpoints (.NET Core 3.0 or higher)
@@ -151,7 +152,7 @@ Data breakpoints break execution when a specific object's property changes.
151152

152153
1. In a .NET Core project, start debugging, and wait until a breakpoint is reached.
153154

154-
2. In the the **Autos**, **Watch**, or **Locals** window, right-click a property and select **Break when value changes** in the context menu.
155+
2. In the **Autos**, **Watch**, or **Locals** window, right-click a property and select **Break when value changes** in the context menu.
155156

156157
![Managed Data Breakpoint](../debugger/media/managed-data-breakpoint.png "Managed Data Breakpoint")
157158

docs/debugger/using-the-debuggerdisplay-attribute.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public sealed class MyClass
8383
}
8484
}
8585
```
86+
8687
The ",nq" suffix tells the expression evaluator to remove the quotes when displaying the final value (nq = no quotes).
8788

8889
## Example

docs/debugger/walkthrough-debugging-at-design-time.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ In some declarative data binding scenarios, it can help to debug code behind in
9696
```xaml
9797
<TextBlock Text="{Binding title, ConverterParameter=lower, Converter={StaticResource StringFormatConverter}, Mode=TwoWay}" />
9898
```
99+
99100
When the page loads, the breakpoint is hit.
100101

101102
## See also

docs/deployment/tutorial-import-publish-settings-azure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ A publish settings file (*\*.publishsettings*) is different than a publishing pr
9494
</publishProfile>
9595
</publishData>
9696
```
97+
9798
Typically, the preceding *.publishsettings file contains two publishing profiles that you can use in Visual Studio, one to deploy using Web Deploy, and one to deploy using FTP. The preceding code shows the Web Deploy profile. Both profiles will be imported later when you import the profile.
9899

99100
## Import the publish settings in Visual Studio and deploy

docs/extensibility/adding-an-lsp-extension.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ Follow these steps below to add support for settings to your LSP language servic
292292
"foo.maxNumberOfProblems": -1
293293
}
294294
```
295+
295296
2. Right-click on the JSON file and select **Properties**. Change the **Build** action to "Content" and the "Include in VSIX' property to true.
296297

297298
3. Implement ConfigurationSections and return the list of prefixes for the settings defined in the JSON file (In Visual Studio Code, this would map to the configuration section name in package.json):
@@ -314,6 +315,7 @@ Follow these steps below to add support for settings to your LSP language servic
314315
```
315316

316317
Sample:
318+
317319
```
318320
[$RootKey$\OpenFolder\Settings\VSWorkspaceSettings\MockLanguageExtension]
319321
@="$PackageFolder$\MockLanguageExtensionSettings.json"

docs/extensibility/debugger/reference/metadata-address-local.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This structure is part of the union in the [DEBUG_ADDRESS_UNION](../../../extens
6161
> ```cpp
6262
> if (addr.dwKind == ADDRESS_KIND_METADATA_LOCAL && addr.addr.addrLocal.pLocal != NULL)
6363
> {
64-
addr.addr.addrLocal.pLocal->Release();
64+
> addr.addr.addrLocal.pLocal->Release();
6565
> }
6666
> ```
6767

docs/extensibility/image-service-and-catalog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ CGlobalServiceProvider::HrQueryService(SID_SVsImageService, &spImgSvc);
344344
**Requesting the image**
345345
346346
::: moniker range="vs-2017"
347+
347348
```cpp
348349
ImageAttributes attr = { 0 };
349350
attr.StructSize = sizeof(attributes);
@@ -361,9 +362,11 @@ CComPtr<IVsUIObject> spImg;
361362
// Replace this KnownMoniker with your desired ImageMoniker
362363
spImgSvc->GetImage(KnownMonikers::Blank, attributes, &spImg);
363364
```
365+
364366
::: moniker-end
365367

366368
::: moniker range=">=vs-2019"
369+
367370
```cpp
368371
UINT dpiX, dpiY;
369372
HWND hwnd = // get the HWND where the image will be displayed
@@ -385,6 +388,7 @@ CComPtr<IVsUIObject> spImg;
385388
// Replace this KnownMoniker with your desired ImageMoniker
386389
spImgSvc->GetImage(KnownMonikers::Blank, attributes, &spImg);
387390
```
391+
388392
::: moniker-end
389393
390394
## How do I update WinForms UI?
@@ -407,6 +411,7 @@ IVsImageService2 imageService = (IVsImageService2)Package.GetGlobalService(typeo
407411
**Request the image**
408412

409413
::: moniker range="vs-2017"
414+
410415
```csharp
411416
ImageAttributes attributes = new ImageAttributes
412417
{
@@ -428,9 +433,11 @@ IVsUIObject uIObj = imageService.GetImage(KnownMonikers.Blank, attributes);
428433
Bitmap bitmap = (Bitmap)GelUtilities.GetObjectData(uiObj); // Use this if you need a bitmap
429434
// Icon icon = (Icon)GelUtilities.GetObjectData(uiObj); // Use this if you need an icon
430435
```
436+
431437
::: moniker-end
432438

433439
::: moniker range=">=vs-2019"
440+
434441
```csharp
435442
Control control = // get the control where the image will be displayed
436443
@@ -454,6 +461,7 @@ IVsUIObject uIObj = imageService.GetImage(KnownMonikers.Blank, attributes);
454461
Bitmap bitmap = (Bitmap)GelUtilities.GetObjectData(uiObj); // Use this if you need a bitmap
455462
// Icon icon = (Icon)GelUtilities.GetObjectData(uiObj); // Use this if you need an icon
456463
```
464+
457465
::: moniker-end
458466

459467
## How do I use image monikers in a new tool window?

0 commit comments

Comments
 (0)