CodeMaid

Free

CodeMaid is an open source Visual Studio extension to cleanup, dig through and simplify our C#, C++, F#, VB, XAML, XML, ASP, HTML, CSS and JavaScript coding.

(88) Review
Visual Studio
2012, 2010
Download (179,768)
4/7/2013
0.6.0
View
E-mail Twitter del.icio.us Digg Facebook
Add To Favorites
Description
Reviews (88)
Q and A (65)
Sign in to Write a Review
Sort By:

by .Marcus. _ | December 06 2012

Hi Steve,
another request for XAML Coding :

Would it be possible to add a feature to convert marked Property Settings to Setter Tag in other words convert exsist control property to style setter e.g.

IsReadOnly="True"
<Setter Property="IsReadOnly" Value="True" />

Thanks in advance
Marcus

PS : Don't know why my previous review (Nov-7) is lost :(

Steve Cadwallader December 08 2012
| Edit |
Delete

Hi Marcus -

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

-Steve Cadwallader

by Marco Bev | November 28 2012

by LetsTryOnceMore | November 24 2012

One of the best tools out there , eleven starts from me.Don't even think before download ,just go for it . you will love it.

by Exe.Cute | November 01 2012

great extension

by Björn Ranft | October 19 2012

Hi Steve,

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?

Best Regards,
Björn

Steve Cadwallader October 20 2012
| Edit |
Delete

Hi Björn -

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.

Hope it helps, :)
-Steve Cadwallader

by seejc82 | October 16 2012

by Philipp Riedel | October 10 2012

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?

BR Philipp

Steve Cadwallader October 10 2012
| Edit |
Delete

I'm glad to hear you like CodeMaid. :)

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.

Hope it helps.

by aiui | September 27 2012

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.

Keep up the great work, thank you.

Steve Cadwallader September 29 2012
| Edit |
Delete

Thanks for the great review, it is really nice to hear. :)

That's an interesting idea for Spade - I've added it to the Trello backlog here: https://trello.com/c/EHGCjrnt

by Bruno Caritte | September 17 2012

Quick and efficient
Saves thousands of clicks

by Ion Drimba Filho | September 04 2012

by AAKoken | September 03 2012

That's a cool extension. Congrats!

by Kamil Anurdeen | August 30 2012

by infoconex | August 30 2012

This just saved me hours of time. Was working on a test project with thousands of methods and wanted to get them sorted. Installed CodeMaild and reorganized and now they are all ordered as I wanted.

Also issued cleanup which performed my next favorite refactor which removed all the unused using statements and extra blank lines.

Thanks a TON for your contribution.

by SegaWang | August 27 2012

Super nice utility~ I really thanks for your big effort. Nice job

by ala2033 | August 25 2012

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?

Example

Before running cleanup
using System;
using Project;

After running cleanup
using Project;
using System;

Steve Cadwallader August 25 2012
| Edit |
Delete

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?

by Rax99 | August 22 2012

Excellent utility. The editor colouring for methods, properties and classes makes the world of difference.
Code cleanup is fabulous, trims away all that bloat!
Also the Spade to see your methods and properies in a clickable list is very handy indeed.

Well done Steve.

Steve Cadwallader August 23 2012
| Edit |
Delete

Thanks, I appreciate it. :)

by rammi | August 02 2012

Seems like pretty good extension, but for me it worked only twice, after that I'm still getting this error:

(in VS2010 prof.)

CodeMaid stopped cleaning 'FileName.cs': System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at EnvDTE80.DTE2.ExecuteCommand(String CommandName, String CommandArgs)
at

Later I realized, that it's on file which is not included in solution.

But there is also another bug. when using usings inside namespaces, it truncate their names.

e.g.: using System.Collections.Generic;
becomes: using System.Collections.Gene

in source starting with:
namespace My.Services.Business
{
using System.Activities;
using My.Model.MyStore;
using My.DataContracts.MyStore.Base;
using System.Collections.Generic;

Steve Cadwallader August 05 2012
| Edit |
Delete

There are a few open bugs that cropped up while I was on vacation. Using statements defined inside namespaces is one that has been reported and is in progress: https://bitbucket.org/s_cadwallader/codemaid/issue/117/using-statements-corrupted-if-within

Sorry for the troubles, I'll be working on them this weekend.

Update: The fix for this is now in beta testing. If you'd like to try it out please download the latest release directly from BitBucket. Thanks for reporting the bug!

by Kirillenseer | August 01 2012

One major flaw: it kills refactoring for me. After installing CodeMaid, refactoring hangs VS to the death, after removing CodeMaid, it works just well again.

Steve Cadwallader August 05 2012
| Edit |
Delete

Sorry to hear of the trouble you are having. There is a known issue in progress (see https://bitbucket.org/s_cadwallader/codemaid/issue/119/codemaid-hangs-when-renaming-something-and) that if you have enabled both "Automatically run cleanup on file save" and "Run reorganize at start of cleanup" and use a native VS refactoring operation Visual Studio will hang. It should be fixed soon and the temporary work-around is to disable either one of those two options. Hope it helps.

Update: The fix for this is now in beta testing. If you'd like to try it out please download the latest release directly from BitBucket. Thanks for reporting the bug!

by Dan Morey | July 27 2012

Top extension. Automatically tiding up after I click save is great, and I love the options on what gets modified (especially being able to re-add using statements that I always want). I'll being paying close attention to any updates that come from this extension.

Steve Cadwallader July 31 2012
| Edit |
Delete

Thanks Dan, glad to hear it. :) Feel free to join in on the discussions on what comes next on the Trello board here https://trello.com/board/future/4f6e6dcc255ed1e9085b8665

by NarayanaR | July 21 2012

21 - 40 of 88 Items   
Sign in to Start a Discussion


  • trailing spaces are not getting removed in VS2012
    2 Posts | Last Post May 02, 2013
    • Hi,
      
      I am using VS 2012 Premium update 2, with python tools for visual studio. When I save the file, the trailing spaces at the end of lines are not getting removed, even though "Remove end of line whitespace" option is checked.
      
      Is there a fix?
      
      thanks!
    • Which kind of file (.html, .js, .xml, etc.) is not removing end of line whitespace?  Are other CodeMaid cleanup operations running successfully on that file?
  • Sort base class and interfaces
    3 Posts | Last Post April 30, 2013
    • Wouldn't it be useful to sort base class and interface names at a class definition to some definitive order? Like base class first, then all interfaces in alphabetical order. Similar to sorting all using statements (which have their own special sorting as well). I usually don't have too many interfaces in my code, what do others think about it?
    • Nobody here? Strange...
    • I didn't have a strong opinion on this one which is why I haven't chimed in.  I turned this concept into a Trello card for you to see if you get any more responses over there: https://trello.com/c/3GqHdVqW
      
  • Seems like spade doesn't work with XAML
    2 Posts | Last Post March 10, 2013
    • It seems like spade doesn't work with XAML
      May be extension conflict?
      Did you test spade from last version to work with XAML?
    • Spade does not have support for XAML files yet.  It currently supports C# and C++.  I have created a card on Trello here: https://trello.com/c/9UdT5NIW
      
      Feel free to vote up the card, and/or fork the code on BitBucket if you want to jump start it faster. :)
  • Code Switch - Partial Classes?
    2 Posts | Last Post February 28, 2013
    • It would be nice if this extension could support code switching between partial classes in C#. We don't need it very much but did some refactoring today and it would been really nice to have.
    • Good idea, I like it.  I've turned it into a Trello backlog card here: https://trello.com/c/lEQ840VZ for voting/comments.
      
      Feel free to vote up the card, and/or fork the code on BitBucket if you want to jump start it faster. :)
  • Would you be willing to support F# as well?
    2 Posts | Last Post February 28, 2013
    • I've got several F# projects and would be interested in this tool supporting them as well.
    • Yep, I have some interest and there is an existing card on the Trello backlog here:  https://trello.com/c/bzZtNrH9
      
      Feel free to vote up the card, and/or fork the code on BitBucket if you want to jump start it faster. :)
  • New Icons for Spade
    2 Posts | Last Post February 22, 2013
    • Are there any plans to update the icons in the Spade to match the new Visual Studio 2012 icons?
    • Thanks for the reminder Brandon.  Microsoft did not originally release the icon library with VS2012, but I went and checked and they have been published now.
      
      I've put in a Trello card for the next release to update the icons accordingly: https://trello.com/c/2N21g0HQ
  • About memory leak
    2 Posts | Last Post February 20, 2013
    • After 16..24 hours of work without reopen VS 2012, memory allocated is over 650MB, this make VS too slow, if I remove CodeMaid, have no trouble.
      I call twice "Cleanup All Code..." over my solution (www.pildra.com.br), about 12K lines, Windows Task Manager report 730 MB VS allocated, before is about 115MB.
      I think have a memory leak.
      CodeMaid is a good tool.
      
      Thanks.
      
    • I'm glad you like the tool, and thanks for reporting the memory usage you are seeing.  I have turned this into a BitBucket issue here: https://bitbucket.org/s_cadwallader/codemaid/issue/185/review-and-improve-memory-usage-during
  • Is it possible to add new file types that codemaid works with?
    2 Posts | Last Post February 12, 2013
    • I have been working with Sandcastle documentation which has an extension of .aml and would love to have codemaid auto format documents, however it does not recognize the extension. 
    • Hi Jim -
      
      I've added your feature request to the Trello backlog here: https://trello.com/c/ULEZa4xF
      
      I'm not familiar with Sandcastle documentation, but if you'd like to email me a small sample via codemaid at gmail I can take a look to see how much work it would be to support it.
      
      -Steve Cadwallader
  • Mistake in skipping files.
    2 Posts | Last Post February 12, 2013
    • I use CodeMaid 0.5.6, on my projet have many source files (in C#) with name ended in Designer, these files is skipped.
    • Thanks for pointing that out.  You can fix it by going to CodeMaid->Configuration->Cleaning->File Types and changing the exclude regular expression from .*.Designer.cs to .*\.Designer\.cs   This is intended to exclude windows forms generated code, but the periods were not being properly escaped so it could improperly ignore similarly named files.
      
      I've checked in the fix for this and it will be present in the next release.  Thanks again for your help finding that. :)
  • Unable to uninstall from VS2012
    5 Posts | Last Post January 22, 2013
    • I downloaded CodeMaid v0.5.6 and installed it.
      
      I've run uninstallation (from Tools>Extensions) and then restarted VS but the CodeMaid menu is still present and I can't open the solution that I'm working on (it's quite large) because CodeMaid hangs (The code maid spade pane just says 'loading <classname>').
      
      I'd be grateful for a workaround as the only way I can open this solution now is to run VS in safe mode!
      
      Thanks
      Ed
    • Key fact that I haven't included above - this was using VS 2012
    • In regards to the hang, is it a C++ solution?  There is a known issue that Microsoft is looking into with the VS2012 C++ API.  The workaround for now is to close the Spade tool window.  Details: https://connect.microsoft.com/VisualStudio/feedback/details/770205/accessing-envdte80-codeclass2-c-members-hangs-vs2012
      
      I haven't heard of that installation difficulty before.  CodeMaid is utilizing the standard VSIX installer for Visual Studio extensions.  Here's a few things to check/try:
      
      * Can you disable the extension?
      * Did you install it under a different Windows user profile?
      * Is it also installed under VS2010?
      * If you run Visual Studio as an administrator, does the uninstall work correctly?
      
      Hope it helps,
      -Steve Cadwallader
    • Thanks for responding Steve,
      
      It's a C# solution (with around 25 sub projects, including MVC4). The hang does look related to the spade tool window - but your link doesn't seem to work. VS only hangs when I open my project. I am able to access the code maid menus before I've opened any project.
      
      -When I first installed CodeMaid, I did so running as administrator. I've tried to uninstall as administrator.
      -Uninstall/Disable both complete (via Extensions & Updates window) but don't remove the CodeMaid menu, although they do seem to remove the functionality behind the menu items. Is there a way to do a manual uninstall?
      -It is also installed under VS2010 but I've not tried running it
      -If I could clean up my installation, I could try installing it as a non-administrator user.
      
      It is now in a state where I've tried to uninstall it but now on VS startup I get an error message: The '... CodeMaidPackage ...' did not load correctly. This at least means I can open my solution and contine working!
      
      
    • Sorry to hear of your ongoing troubles.  I believe you need to uninstall it under both VS2010, and both VS2012 for it to be removed.  I would have expected it to disappear from VS2012 after it was uninstalled there though, so it sounds like something in your install is corrupted.
      
      You could try forcing an uninstall, check out: http://stackoverflow.com/questions/1526733/uninstalling-the-vs2010-extension-without-the-extension-manager
      
      
1 - 10 of 65 Items