Skip to content

Commit 4fcd33d

Browse files
authored
Merge pull request #4477 from MicrosoftDocs/master
4/18/2019 AM Publish
2 parents 53aa5a4 + 6182c0b commit 4fcd33d

File tree

3,086 files changed

+34358
-34057
lines changed

Some content is hidden

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

3,086 files changed

+34358
-34057
lines changed

.markdownlint.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,20 @@
22
"default": true,
33
"MD001": false,
44
"MD002": false,
5-
"MD003": false,
65
"MD004": false,
76
"MD005": false,
87
"MD006": false,
98
"MD007": false,
109
"MD009": false,
1110
"MD011": false,
1211
"MD013": false,
13-
"MD019": false,
14-
"MD020": false,
1512
"MD022": false,
1613
"MD024": false,
1714
"MD025": false,
1815
"MD026": false,
1916
"MD027": false,
2017
"MD028": false,
2118
"MD029": false,
22-
"MD030": false,
23-
"MD031": false,
2419
"MD032": false,
2520
"MD033": {
2621
"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-configure-roles-for-cloud-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ The following code shows an example of how to write a text file to local storage
250250

251251
To view the file created by the code in the previous section, follow these steps:
252252

253-
1. In the Windows notification area, right-click the Azure icon, and, from the context menu, select **Show Compute Emulator UI**.
253+
1. In the Windows notification area, right-click the Azure icon, and, from the context menu, select **Show Compute Emulator UI**.
254254

255255
![Show Azure compute emulator](./media/vs-azure-tools-configure-roles-for-cloud-service/show-compute-emulator.png)
256256

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/C26416.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ R.34: Take a shared_ptr\<widget> parameter to express that a function is part ow
2222
Passing a shared pointer by rvalue reference is usually unnecessary. Unless it is an implementation of move semantics for a shared pointer type itself, shared pointer objects can be safely passed by value. Using rvalue reference may be also an indication that unique pointer is more appropriate since it clearly transfers unique ownership from caller to callee.
2323

2424
## Remarks
25-
- This check recognizes std::shared_pointer and user-defined types which are likely to behave like shared pointers. The following traits are expected for user-defined shared pointers:
26-
- overloaded dereference or member access operators (public and non-deleted);
27-
- copy constructor or copy assignment operator (public and non-deleted);
28-
- public destructor which is neither deleted nor defaulted. Empty destructors are still counted as user-defined.
25+
- This check recognizes std::shared_pointer and user-defined types which are likely to behave like shared pointers. The following traits are expected for user-defined shared pointers:
26+
- overloaded dereference or member access operators (public and non-deleted);
27+
- copy constructor or copy assignment operator (public and non-deleted);
28+
- public destructor which is neither deleted nor defaulted. Empty destructors are still counted as user-defined.
2929

3030
## Example
3131
questionable constructor optimization

docs/code-quality/C26417.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ R.35: Take a shared_ptr\<widget>& parameter to express that a function might res
2222
Passing shared pointers by reference may be useful in scenarios where callee code updates target of the smart pointer object and its caller expects to see such update. Using a reference solely to reduce costs of passing a shared pointer is questionable. If callee code only accesses target object and never manages its lifetime, it is safer to pass raw pointer or reference, rather than to expose resource management details.
2323

2424
## Remarks
25-
- This check recognizes std::shared_pointer and user-defined types which are likely to behave like shared pointers. The following traits are expected for user-defined shared pointers:
26-
- overloaded dereference or member access operators (public and non-deleted);
27-
- copy constructor or copy assignment operator (public and non-deleted);
28-
- public destructor which is neither deleted nor defaulted. Empty destructors are still counted as user-defined.
29-
- The action of resetting or reassigning is interpreted in a more generic way:
30-
- any call to a non-constant function on a shared pointer can potentially reset the pointer;
31-
- any call to a function which accepts a reference to a non-constant shared pointer can potentially reset or reassign that pointer.
25+
- This check recognizes std::shared_pointer and user-defined types which are likely to behave like shared pointers. The following traits are expected for user-defined shared pointers:
26+
- overloaded dereference or member access operators (public and non-deleted);
27+
- copy constructor or copy assignment operator (public and non-deleted);
28+
- public destructor which is neither deleted nor defaulted. Empty destructors are still counted as user-defined.
29+
- The action of resetting or reassigning is interpreted in a more generic way:
30+
- any call to a non-constant function on a shared pointer can potentially reset the pointer;
31+
- any call to a function which accepts a reference to a non-constant shared pointer can potentially reset or reassign that pointer.
3232

3333
## Example
3434
unnecessary interface complication

docs/code-quality/C26418.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ R.36: Take a const shared_ptr\<widget>& parameter to express that it might retai
2222
If shared pointer parameter is passed by value or reference to a constant object it is expected that function will take control of its target object’s lifetime without affecting of the caller. The code should either copy or move the shared pointer parameter to another shared pointer object or pass it further to other code by invoking functions which accept shared pointers. If this is not the case, then plain pointer or reference may be feasible.
2323

2424
## Remarks
25-
- This check recognizes std::shared_pointer and user-defined types which are likely to behave like shared pointers. The following traits are expected for user-defined shared pointers:
26-
- overloaded dereference or member access operators (public and non-deleted);
27-
- copy constructor or copy assignment operator (public and non-deleted);
28-
- public destructor which is neither deleted nor defaulted. Empty destructors are still counted as user-defined.
25+
- This check recognizes std::shared_pointer and user-defined types which are likely to behave like shared pointers. The following traits are expected for user-defined shared pointers:
26+
- overloaded dereference or member access operators (public and non-deleted);
27+
- copy constructor or copy assignment operator (public and non-deleted);
28+
- public destructor which is neither deleted nor defaulted. Empty destructors are still counted as user-defined.
2929

3030
## Example
3131
unnecessary interface complication

docs/code-quality/C26432.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Special operations like constructors are assumed to alter behavior of types so t
2323

2424
## Remarks
2525
- This check implements "the rule of five" which treats the following operations as special:
26-
- copy constructors;
27-
- move constructors;
28-
- copy assignment operators;
29-
- move assignment operators;
30-
- destructors;
31-
- The rule doesn’t check if operations are defined in the same way, i.e. it is okay to mix deleted and defaulted operations with explicitly defined, but they all must be specified somehow if any of them appears.
32-
- Access levels are not important and can also be mixed.
33-
- The warning flags the first non-static function definition of a type, once per type.
26+
- copy constructors;
27+
- move constructors;
28+
- copy assignment operators;
29+
- move assignment operators;
30+
- destructors;
31+
- The rule doesn’t check if operations are defined in the same way, i.e. it is okay to mix deleted and defaulted operations with explicitly defined, but they all must be specified somehow if any of them appears.
32+
- Access levels are not important and can also be mixed.
33+
- The warning flags the first non-static function definition of a type, once per type.

docs/code-quality/C26436.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ If a class defines a virtual function it becomes polymorphic, which implies that
2323

2424
## Remarks
2525
- The warning shows up on the first virtual function definition of a type (it can be a virtual destructor if it is not public), once per type.
26-
- Since definition can be placed separately from declaration, it may not always have any of the virtual specifiers. But the warning is still valid – it checks the actual ‘virtuality’ of a function.
26+
- Since definition can be placed separately from declaration, it may not always have any of the virtual specifiers. But the warning is still valid – it checks the actual ‘virtuality’ of a function.

docs/code-quality/C26439.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Some kinds of operations should never cause exceptions. Their implementations sh
2323

2424
## Remarks
2525
- Special kinds of operations are the following:
26-
- destructors;
27-
- default constructors;
28-
- move constructors and move assignment operators;
29-
- standard functions with move semantics: std::move and std::swap.
30-
- Non-standard and outdated specifiers like throw() or declspec(nothrow) are not equivalent to ‘noexcept’.
31-
- Explicit specifiers noexcept(false) and noexcept(true) are respected appropriately.
32-
- The warning may still appear for operations that are marked as constexpr. This may change in future releases.
26+
- destructors;
27+
- default constructors;
28+
- move constructors and move assignment operators;
29+
- standard functions with move semantics: std::move and std::swap.
30+
- Non-standard and outdated specifiers like throw() or declspec(nothrow) are not equivalent to ‘noexcept’.
31+
- Explicit specifiers noexcept(false) and noexcept(true) are respected appropriately.
32+
- The warning may still appear for operations that are marked as constexpr. This may change in future releases.

docs/code-quality/C26440.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ If code is not supposed to cause any exceptions, it should be marked as such by
2323

2424
## Remarks
2525
- A function is considered non-throwing if:
26-
- it has no explicit throw statements;
27-
- function calls in its body, if any, invoke only functions that unlikely to throw: constexpr or functions marked with any exception specification which entails non-throwing behavior (this includes some non-standard specifications).
28-
- Non-standard and outdated specifiers like throw() or declspec(nothrow) are not equivalent to ‘noexcept’.
29-
- Explicit specifiers noexcept(false) and noexcept(true) are respected appropriately.
30-
- Functions marked as constexpr are not supposed to cause exceptions and are not analyzed.
31-
- The rule also applies to lambda expressions.
32-
- The logic doesn’t consider recursive calls as potentially non-throwing. This may change in the future.
26+
- it has no explicit throw statements;
27+
- function calls in its body, if any, invoke only functions that unlikely to throw: constexpr or functions marked with any exception specification which entails non-throwing behavior (this includes some non-standard specifications).
28+
- Non-standard and outdated specifiers like throw() or declspec(nothrow) are not equivalent to ‘noexcept’.
29+
- Explicit specifiers noexcept(false) and noexcept(true) are respected appropriately.
30+
- Functions marked as constexpr are not supposed to cause exceptions and are not analyzed.
31+
- The rule also applies to lambda expressions.
32+
- The logic doesn’t consider recursive calls as potentially non-throwing. This may change in the future.

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

0 commit comments

Comments
 (0)