Learning about cleanup actions
Once the extension is installed, the Extensions | CodeMaid context menu does an excellent job of calling out the most used functions. Near the top of the following screenshot, we see several CleanUp menu items. These different options dictate whether the cleanup operation will occur on just the active document, all open documents, or the entire solution:
When we talk about cleanup actions, we are primarily interested in things such as this:
- Removing unused
using
statements and sorting the rest alphabetically - Removing extra whitespace or adding space in front of the method, between lines, or at the end of lines
- Formatting indentation and whitespace from one line to the next to match its level within the logic hierarchy or display tag structure
- Adding access modifiers to variables or methods where they are currently absent (are they private or internal by default?) ...