Really nice extension. I thing though, the CodeMaid Spade fail to parse the `para` tag of the documentation comment, instead it read it as text. Sorry, I can't find a place to post this bug so I post it here.
Summary: Too difficult to pick up and use, requires some seriously dedicated time to learn what the features are, and how they work.
Installation and uninstallation was problematic and frustrating, requiring installing/uninstalling/restarting VS2012 several times.
With a poorly designed configuration window which uses non standard UI interfaces, it makes it difficult to know what auto formatting options are selected, leaving the developer in a position of not knowing what changes are going to happen to the code files they happen to open and close.
Some suggestions to author: 1) Incorporate your configuration window into the VS Options window. 2) Use the already estabilished layout of a list box with checkboxes to select the options the developer can enable/disable, followed by a preview box of how the code is affected by each option. 3) If there are any options that will do 'code cleanup' in the background then those options should be centralised with a clear indicator of when and how those background processes will function.
Initially installed this for the formatting options, but it became unusable for me after constantly hanging on "waiting for background operation to complete" when opening the Spade on certain files. Even after disabling _every_ option and creating a new C++ project.
It's a shame, because I really like the Spade layout (sort of like the Code Map extension before it sold out).
Sorry for the trouble you're having. Unfortunately that is a known issue with VS2012 that I have been working on with Microsoft. Please feel free to vote up the Microsoft Connect issue and keep an eye on it for when it is resolved: https://connect.microsoft.com/VisualStudio/feedback/details/770205/accessing-envdte80-codeclass2-c-members-hangs-vs2012
The issue shows the last update is on November 9th but I've been talking to them for several weeks past that and am still hoping for a resolution.
Steve you've got 5 stars from me! My favourite extension, no doubt. Since I'm mostly using Code digging tool (McCabe software quality metric) for QA purposes, I'd like to ask you for a feature of turning off or ignoring switch-case statement for McCabe results. I know that this statement is included when measurig Cyclomatic complexity, but since most of switch-cases are easily readable, OK for maintaining and sometimes there are no space for introducing new classes for eliminating them with the use of switch-case design pattern (polymorphism), it would be great if not including McCabe results for these type of statements would be configurable. One more very usable feature would be sorting methods in CodeMain window by McCabe results. Many thanks for your effort! Keep up the good work
That's great, I'm really glad to hear the complexity calculations are helping you out.
I have added two new cards to the backlog for your feature requests: * Customize complexity results: https://trello.com/c/bRagJvzB * Sort by complexity: https://trello.com/c/mWSOjEvS
Be sure to check those out, add more comments if I missed anything and vote them up.
If you didn't notice, in the latest release I added a tooltip at the class level that will show you the most complex item. I think you may find that handy, here's the card with screenshots: https://trello.com/c/mNhnA7HK
Thanks for the great review and suggestions. :) -Steve Cadwallader
Thanks for the feature suggestion, but that's pretty outside of CodeMaid's scope. I'd recommend ReSharper as a tool for refactoring support.
I think you can only have one review posted, so creating this one may have removed the previous one. In the future you can use Trello for feature suggestions here: https://trello.com/board/future/4f6e6dcc255ed1e9085b8665
thanks for this great extension, saves hours of dirty code formatting work. One thing I don't exactly know if it's supported by your extension is a hint to this. keyword when reoranizing a class. StyleCop informs me about missing this keyword, I've assumed when using reorganizing class it's done by code maid. Maybe I missed something?
Wonderful, I'm glad to hear CodeMaid is saving you a lot of time and making your code cleaner. :)
StyleCop does have a rule (SA1101) to prefix all local calls with "this." - but CodeMaid does not enforce it. So if your code already has that prefix it won't be removed by CodeMaid, but it won't be inserted either. I know ReSharper has a setting that will insert those prefixes, but by default they actually recommend removing them because they're redundant to the compiler.
Hi Steve, I like this plugin very much. Unfortunately since I have been using Visual Studio 2012 the option "Automatically run cleanup on file save" is no longer working correctly. Your extension does the sort of using statements, but it does not remove unused using statements anymore. Anything we can do about it? Are there any log files I can send you to solve this issue?
This is by design to resolve a possible race condition that can occur during refactoring. You can re-enable the old behavior within Configuration->Cleaning->Visual Studio->Run remove unused using statements->Skip during automatic cleanup on save. Keep in mind that some VS refactoring operations though will clash with this behavior which is why it is disabled by default.
One of the best extensions i've ever worked with. It's just fantastic and easy to use. It's light, compact and very, very effective in improving productivity. Seriously, i really loved it.
It would be nice if you, in the Spade window, added a view type that can tell us wich methods belong to each interface/Parent class. Like if i have method X that is implemented for interface Y, a group, like the enums group, would show up in Spade separating methods/properties from interface Y and inteface F. That would be just perfect.
I downloaded the latest release and now when the code cleanup runs it sorts using statements alphabetically; however, it does not keep the System usings above my project usings which in turn makes StyleCop unhappy. FYI - I always put my using statements inside the namespace. Any chance you can update the tool to resolve this issue?
Before running cleanup using System; using Project;
After running cleanup using Project; using System;
I wasn't able to reproduce this issue. Will you open an issue on BitBucket (https://bitbucket.org/s_cadwallader/codemaid/) including your configuration (ex: if you have configured CodeMaid to re-insert unused using statements and which ones in what order), and a small code sample?
This is my 1st time trying to use tools like code maid. After i installed the app using NuGet, the nuget manager app indicates that CodeMaid is disabled - when I doublie click the disabled Enable button, the app is ready to uninstall from the machine. Answer links present for a 'disabled' search on the QA page are broken.
Any help will be greatly beneficial.
My bad. Fixed it. My colleague helped me out. For folks who might need the solution: In Tools-->Option window, Under Environment, there is an option 'Extension and Updates'. In my problem, Load per user extension when running as adminstrator was NOT checked. I checked it (set the checkbox to true) and re-started vs 2013.
thanks for your patience.
Hi Ravi -
I'm glad that you figured out the source of the problem, and I appreciate you sharing it for anybody else who might encounter that setting having been changed. Hope you enjoy the tool. :)
Sorry to hear it. I haven't seen that issue or had any other users report it. Have you noticed any patterns about when your settings are getting reset, such as it happens after performing an operation in another extension? My best guess would be that the shared space where user preferences are stored are getting overwritten.
As a workaround until we can identify the source of the reset, I'd recommend exporting your settings when they're valid so you can quickly re-import them once you've noticed they have been reset.
Hi - the "Cleanup Code" menu option (and keyboard binding) are unavailable in my .html/.cshtml files. The command is available for .cs and .js files. I've gone through the configuration and the HTML checkbox is checked in the File Types section. Any ideas why this command is being disabled for these files? I'm using VS 2013.
There is a known issue with Visual Studio's devenv.exe.config file that I'm working with Microsoft to get resolved. The net effect is that the cleanup commands invoked from the solution explorer will not work, but you should still be able to cleanup files that are open as document tabs. Please follow through our BitBucket issue to track status and vote up the backing Microsoft connect issue, as well as view a workaround: https://bitbucket.org/s_cadwallader/codemaid/issue/220/vs2013-cleanup-all-code-shows-error
Is there any way to bypass code cleaning for a class or a region?
For example, in my DemoCode.cs, there are 3 classes: MyControl, MyEntity and MyHelper. I don't want MyEntity to be sorted when doing code cleaning.
Another example, in MyControl class, there are some functions in a #region block that I don't want them be sorted.
Thank you for reply.
Hi Chris -
No, currently reorganization runs on the entire file. In the case of your three classes in one file I would recommend separating the classes each to their own file as good practice and an easy workaround. However skipping a region would be a little trickier without utilizing partial classes. Is it a standard region that you would always want to skip, or just a one-time example? If you have some ideas about a feature request please start the conversation on the Trello backlog here: https://trello.com/b/VVxVhbQv/future
Hope it helps,
In our team we made it mandatory to use CodeMaid, but the sorting order rules for using statements differ across team members. For some it is correct - System usings go first, but for others they get sorted alphabetically regardless being System imports or not. We didn't find any configuration setting that would affect this.
Is this setting hidden in some config file?
Thank you for reply.
Hi Maynard -
I encountered that as well with my own team. There is a setting for this within Visual Studio's Options under Text Editor->C#->Advanced->"Place 'System' directives first when sorting usings"
This option used to be enabled by default in VS2010 and earlier, but Microsoft changed it to be disabled by default in VS2012 and later due to Windows Store apps using the Windows.* namespace.
A couple useful links:
Hope it helps, :)
Hi Zubayba -
The current version of CodeMaid no longer supports Visual Studio 2005 or Visual Studio 2008. The last version of CodeMaid that does support those versions is v0.4.3 which can be downloaded from here: https://bitbucket.org/s_cadwallader/codemaid/downloads/CodeMaid_v0.4.3.msi
Hope it helps,
I downloaded this tonight and installed it on a new machine with VS2010 -- I really like the "Format comments during cleanup, Wrap comments at column" option -- but it's disabled, and there's no way to make it turn on. What gives?
Also, completely different issue with the same feature: in the version of Code Maid installed on my home machine that I downloaded last month, the "wrap comments at column" feature was deleting the preceding white space from the first line of a block of comments. It was very annoying. I could do a reformat of the document to realign the comments -- but even with the checkbox "Run format document" checked, it didn't fix the issue when I ran CodeMaid clean (was the format document being run before the format comments? Seems to me that switching the order those items are called in would fix that issue.)
Comment formatting support is currently only available in VS2012 and higher. There is a card in the backlog here to add support for VS2010 if you would like to vote it up/track progress: https://trello.com/c/QylslKhh
There are a few known issues with comment formatting which is a new feature. You can track them and/or report them if not already present on BitBucket (https://bitbucket.org/s_cadwallader/codemaid/issues?status=new&status=open . Additionally you can download the latest alpha releases which contain some fixes.
Setting the Display Theme to dark seems to only be partially implemented.
Certain portions of the window are in a dark theme, but everything else is light grey on white, making it unreadable.
You can see an example of how it displays here:
Thanks for reporting the issue. I am unable to reproduce. Will you file a bug on BitBucket including details like an exported copy of your settings, what version of Visual Studio you are using and which Visual Studio theme you are using?
Do you have plans to add additional StyleCop rules to the reorganize method? Personally I would like to have it move using directives inside the namespace and add the file copyright XML that is required by StyleCop.
It would also be nice to have your extension turn on stylecop on a project so I do not have to edit the csproj file directly.
Overall I love it though.
Glad to hear you love it. :) Please check out the product backlog on Trello to vote/comment/suggest new features:
Some of your suggestions are already present:
Thanks for the suggestion. I think there is already another VS extension that is focused on statement alignment - check out: http://visualstudiogallery.msdn.microsoft.com/7179e851-a263-44b7-a177-1d31e33c84fd