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.
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;
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!
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.
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!
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.
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
A fantastic product! I would like to suggest additional functions which would be useful.
Sort: Select a block of code and sort it alphabetically. Select a switch statement and sort the case statements alphabetically, except default: which must be placed at the end.
Switch: Select a switch statement and prompt for additional missing case statements, then insert the selected missing ones or all missing ones.
Thanks Justin of Cyclops - I'm glad you like it. :) I've added your sorting suggestion to the Trello backlog here (https://trello.com/c/bb6vbdbp) for voting/additional comments. The insert missing case statements option is a bit outside CodeMaid's current functionality set so I don't see it anywhere in the near future - but it is a good idea and you may find it in other products.
This is my number one extension and I am writing a review to recommend it to the rest of my organization (200 developers).
If you want a suggestion on what might be cool to add, here is one thing I used to have, that I miss. SlickEdit for VS was discontinued after VS 2008. It had a reformat for comments that would wrap XML comments at a given column length. There is nothing more code maid tedious than having to reformat modified XML comments. This one was smart in that it formatted in in paragraphs and left line spaces in it alone. It would also format selected sections so that part of it like code examples could be left alone.
Totally love it. My goal in life is to write as much code as possible with as few key strokes as possible. {codemaid} is an important collaborator towards that goal. I should send her flowers.
Update to 0.4.2 from 0.4.1 kept failing therefore I had to uninstall the old version and install the new one afterwords. Kinda bummer but not a huge deal since the product itself is great.
Thanks for the great review despite the installer troubles. New and improved pure-VSIX installer will be coming soon as I fork off the older VS editions.
You're welcome - glad you like it!
Spade supports zooming - you can hold down the Ctrl-key and use the mouse wheel to zoom-in or zoom-out. :) Holding down the Ctrl-key and clicking the middle button will reset the zoom to 100%.
True that! That was what I tried at first.
Turns out reducing zoom level messes up font rendering, give it a try, or I can send you a screenshot if you like.
Sure if you would like to send a screenshot that would be good (codemaid on gmail). Since it is a full window scale transform vs. a font size change the appearance may not remain as crisp depending on the font.
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?
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?
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
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. :)
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. :)
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. :)
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
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
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
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. :)