Skip to content

Commit 5ae90a1

Browse files
TylerMSFTTylerMSFT
authored andcommitted
acrolinx
1 parent a9a6092 commit 5ae90a1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/ide/include-cleanup-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.custom: intro-overview
77
---
88
# Configure C/C++ include cleanup in Visual Studio
99

10-
Starting with Visual Studio 17.7 preview 3, Visual Studio can cleanup your `#include`s to improve the quality of your C and C++ code in the following ways:
10+
Starting with Visual Studio 17.7 preview 3, Visual Studio can clean up your `#include`s to improve the quality of your C and C++ code in the following ways:
1111
- Offers to remove unused header files--improving build times.
1212
- Offers to add header files for code that is only working because the needed header file is included indirectly.
1313

docs/ide/include-cleanup-overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,16 @@ The tool doesn't update the comments, but you can see that the code is now using
111111

112112
If your codebase is large, the recommended approach is to clean up the #includes by first adding direct headers where indirect headers are used. After you have done that for all indirect headers in the file, then remove any unused includes.
113113

114-
To do this, set your the include cleanup setting for **Add missing includes suggestion level** to **Suggestion** (**Tools** > **Options** > **Text Editor** > **C/C++** > **Code Cleanup**). Also set **Remove unused includes suggestion level** to **Suggestion**.
114+
To do this, set the include cleanup setting for **Add missing includes suggestion level** to **Suggestion** (**Tools** > **Options** > **Text Editor** > **C/C++** > **Code Cleanup**). Also set **Remove unused includes suggestion level** to **Suggestion**.
115115

116116
1. In the error list, make sure the filter is set to **Build + IntelliSense**.
117-
1. Look for instances of 'Content from #include x is used in this file and transitively included'.
117+
1. Look for instances of "Content from #include x is used in this file and transitively included".
118118
1. Hover your cursor over line with the suggestion and invoke the quick action menu by clicking the broom or pressing Ctrl+period.
119119
1. Choose **Add all transitively used includes**.
120120
1. Remove unused includes: in the error list, look for all instances of `#include x is not used in this file'.
121121
1. Hover your cursor over the unused header and choose **Remove #include \<header\>**.
122-
1. Repeat these steps until there are no more suggestions about transitively include includes or unused includes.
123-
1. Repeat these steps for the other files in your project that you wish to cleanup.
122+
1. Repeat these steps until there are no more suggestions about transitive includes or unused includes.
123+
1. Repeat these steps for the other files in your project that you wish to clean up.
124124

125125
In this brief overview, you've seen how include cleanup can help you remove unused headers, and add headers that were indirectly included. This helps you keep your code clean, potentially build faster, and reduces the brittleness of your code.
126126

0 commit comments

Comments
 (0)