Skip to content

Commit c0b8d72

Browse files
TylerMSFTTylerMSFT
authored andcommitted
cleanup
1 parent aaee92f commit c0b8d72

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/ide/lnt-make-member-function-const.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ monikerRange: ">=msvc-170"
88
---
99
# `lnt-make-member-function-const`
1010

11-
When member functions don’t modify the object's state, annotate them with the `const` keyword. This guidance comes from the [C++ Core Guideline Con.2](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con2-by-default-make-member-functions-const).
11+
When a member function doesn’t modify the object's state, annotate it with the `const` keyword. This guidance comes from the [C++ Core Guideline Con.2](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con2-by-default-make-member-functions-const).
1212

1313
## Example
1414

15+
The following code is flagged twice by the linter because `getValue()` and `getRadius()` don't modify the object's state:
16+
1517
```cpp
1618
class MyClass
1719
{
@@ -33,7 +35,7 @@ double getRadius()
3335

3436
## How to fix the issue
3537

36-
Mark member functions `const` when they don't modify the object's state. This lets both developers and the compiler know that the function is safe to call on a `const` object.
38+
Mark member functions `const` when they don't modify the object's state. This lets readers of the code and the compiler know that the function is safe to call on a `const` object.
3739

3840
In the following example, `const` has been added to `getValue()` and `getRadius()`:
3941

docs/ide/lnt-naming-convention.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ monikerRange: ">=msvc-170"
88
---
99
# `lnt-naming-convention`
1010

11-
Ensure that the naming convention for symbols aligns with the coding style specified in the project's `.editorconfig` file.
11+
Ensure that the naming convention for symbols aligns with your coding style, as specified in the project's `.editorconfig` file.
1212

13-
To enable this feature, add an `.editorconfig` file in the same directory as your project file. The `.editorconfig` specifies the naming conventions for symbols in your project. For an example `.editorconfig` that specifies the naming conventions for Unreal Engine projects, see this example on [GitHub](https://raw.githubusercontent.com/microsoft/vc-ue-extensions/main/Source/.editorconfig).
13+
To enable this feature, add an `.editorconfig` file in the same directory as your project file. The `.editorconfig` specifies the naming conventions for symbols in your project. As an example, the naming conventions for Unreal Engine projects are specified in an `.editorconfig` on [GitHub](https://raw.githubusercontent.com/microsoft/vc-ue-extensions/main/Source/.editorconfig).
1414

1515
Once you have the `.editorconfig` file in your project, turn on the `lnt-naming-convention` check with the **Naming Convention** setting in the C/C++ Code Style options. For information about how to change this setting, see [Configure the linter](cpp-linter-overview.md#configure-the-linter).
1616

1717
## Example
1818

19-
Given an `editorconfig` file that contains:
19+
Suppose that you have an `.editorconfig` file that contains:
2020

2121
```
2222
cpp_naming_style.boolean_style.capitalization = pascal_case
@@ -51,7 +51,7 @@ The code editor shows bool myFlag = true. With the cursor on that line of code,
5151

5252
## Remarks
5353

54-
Introduced in Visual Studio 2022 17.7, the `lnt-naming-convention` linter check ensures that naming conventions align with naming conventions specified in the `editorconfig` file. You can apply this check to any project that has an `editorconfig` file. You can also customize your `.editorconfig` file to suit your project's coding style.
54+
Introduced in Visual Studio 2022 17.7, the `lnt-naming-convention` linter check ensures that naming conventions align with those specified in the `.editorconfig` file. You can apply this check to any project that has an `.editorconfig` file. You can also customize your `.editorconfig` file to suit your project's coding style.
5555

5656
## See also
5757

0 commit comments

Comments
 (0)