DISABLED for me in Visual Studio 2012 premium. Since this is the 1st time, i am usng it, i felt that i was making some mistakes. this tool has raving reviews and i am wondering why it is not working or disabled for me. any help would be appreciated. regards, Ravi.
This is an awesome util. Thanks a lot Steve! Saved me a ton of precious time. :-)
I just wanted to bring to your notice a minor problem. When I Format the comments, it automatically messes up my copyright info at the top of the file. My company's copyright info normally follows a 3 line comment like: // <copyright file="file.cs" company="MyCompany"> // Copyright (c) 2013 CompanyName. All rights reserved. // </copyright> // <summary>The class summary</summary>
But on formatting comments, it puts it all in just a single line (sometimes 2 lines). Is this intended or am I doing something wrong :^)
Really glad to hear you like it, you're welcome. :)
There are two kinds of comment formatting, traditional comments "//" and XML comment formating "///". It looks like you have XML tags within your copyright definition, but they aren't being marked with the triple slash syntax usually associated with XML comments. If you put the third slash in that will improve behavior. You will also want to mark 'copyright' as a major tag within CodeMaid's configuration (CodeMaid->Configuration->Cleaning->Comments) so that it will always keep new lines before and after.
Hope that helps. If you're still seeing an issue please post a code sample on BitBucket and I'll take a deeper look. :)
Just learnt about this tool today reading a SO answer. Awesome utility to reformat a huge bunch of files that I had to import from another system. And managed to get it done in all of 2 mins.. Great work.
I have to reiterate a point brought up by a previous reviewer.
I like cleaning up the code to add the this keyword in front of class members and methods. It helps to make the code more unified because you NEED to use the this keyword when applying extension methods to the local class. I agree it is not needed in most cases, but it does clarify the target of the request.
StyleCop has this rule for a good reason: code transparency and consistency. Please support this in CodeMaid. it is the last item only thing it doesn't do for me.
Thanks for the suggestion. Personally I always remove them, but there's arguments for both directions.
To implement adding/removing "this." requires a richer code model than what is currently exposed through the Visual Studio API. The Roslyn project promises to expose a code model rich enough to add this kind of functionality in the future, but it has not been released. To get that behavior today you'll need to use a commercial tool (e.g. ReSharper) that has its own static compilation engine.
Excellent tool, perfect to maintain prjects from the get go. I would be careful doing it to large code bases as there are a few gotcha's that you will want to be sure you like the behaviour of before you go ahead and clean a whole solution.
Sorry to hear it. In regards to the crash, please check https://bitbucket.org/s_cadwallader/codemaid/issue/213/refactor-rename-starts-endless-clean-loop if you are seeing a crash during a rename operation.
As to performance, I wouldn't have expected any differences at this point but there are performance improvements in the works going forwards.
Sorry for the trouble. Yes, this is a known issue introduced in the VS2012 API and resolved by the Microsoft team for the next major release. They've offered a workaround which I am working towards implementing. For more details: https://bitbucket.org/s_cadwallader/codemaid/issue/142/spade-starts-endless-process-in-vs-2012-c
For VS2012 C++ projects, you can close the Spade tool window and still use the rest of the functionality of CodeMaid for now.
Hi Fisher -
Yes, that fix was present in v0.5.4 so the menu items should be enabling correctly now. However I did find that the same update was needed in a second location where the code cleanup algorithm is chosen based on the document language - which again changed in VS2012. This fix will be present in the next release, and before that in the next beta which I plan to release this weekend on BitBucket.
Thanks for pointing out that the issue was incomplete.
Thank you for this great extension.
I'm currently working with VS2010 (but it also occurs on VS2012) in C#.
I have a bug report on Spade to make, please follow the steps to reproduce it:
Open a class with the Spade window opened.
Change a member name (it can be a variable name) and don't save. This way, Spade won't refresh.
Now go to Spade window and click on that member name.
It will crash Visual Studio and restart it. Please try to solve it as this is a critical bug.
Thank you and keep up the great work.
I've posted this message on BitBucked also.
I'm just beginning to use VS2012, and the first extension to install is CodeMaid. But, the 'add unspecified access modifiers' feature does not seem to work anymore.
In VS2010, this features still works (with the same installed version).
I like Codemaid and am using the latest download(0.5.4), but am running into a problem. I've got several projects that have more that 500 files in them and Codemaid seems to run out of memeory before getting through any of the projects. I have been able to get it to finish by rerunning it several times and limiting the various configuration opperations but this takes a long time. Is this something you have seen or has anybody else reported this behavior? I'm using VS 2010.
Hi dbl -
I've used CodeMaid on some pretty large solutions (100+ projects) but I haven't done any explicit stress testing so I'm sure there is a limit to how much it can currently handle. There is an existing Trello backlog card to investigate cleaning performance improvements here: https://trello.com/c/RfgFUlAg . Feel free to vote it up and add any details from your own experiences there.
I've tried this with two different solutions each with only one project and 500+ files. You can watch the memory tick up as it gets through every couple of files. I'm wondering if it might be some conflict with one of the other extensions.
Thought I would give you an update. It seems that it is related to TFS. I have been experimenting with different extensions and addins and when I Unbound the projects from TFS. When I did it the memory problems have not occurred.
I've just started using CodeMaid and am curious why it disables the various the compiler warnings at the top of each file, and I can't find a way to turn this off. We treat all warnings as errors except in explicit cases, but I don't want to have to go behind CodeMaid and remove all these. Am I missing a configuration setting?
Nevermind ... The one project I happen to start with has a bunch of generated files in it and I had never noticed that these that pragma warnings in them before ... if delete this discussion if you want.
Did you install the extension into VS2012 separately? The extensions you have installed in VS2010 do not automatically come across into VS2012. If so did you restart VS2012 after installing the extension?
Yes, I did. CodeMaid is installed in VS2012. I see the CodeMaid menu item for example. I can right-click on an open file and choose CodeMaid's Cleanup context menu command. But I can't figure out how to make the CodeMaid toolbar appear. Any chance it could be interfering with ReSharper v7?
Sorry, I seem to have replied to the wrong discussion, thus making me suspect even more strongly that it's my screwup that's causing my problems with CodeMaid in VS2012.
As for the CodeMaid toolbar, I get a CodeMaid toolbar in VS2010.
No problem. :) CodeMaid doesn't have a built-in toolbar - but you can customize and create your own toolbars in Visual Studio. Do you think you may have made your own? I'm not sure if you can export/import settings from VS2010 to VS2012. Otherwise if you can send me a couple screenshots (codemaid at gmail) I can make sure we're on the same page.
First off, you've done some great work here and I hope you continue to work on this. I have a few comments & I’m only being terse due to the space limits here! Also please know I am (mostly) ignorant of how hard these changes would be!!
1) Scope – please consider separating features like: set readonly, find in solution explorer, switch view, collapse recursively and code metrics into other extension(s). Or toggleable (like VS productivity tools). Maybe lightweight and heavyweight versions?
2) StyleCop –Perhaps rename reorganise to apply stylecop – I couldn’t find the feature at first!
3) For me StyleCop cleanup is the big win – The team have done good work integrating resharper but competition here would be great (maybe there is some reuse there too?). Brace management, using keyword aliases, prefixing 'this.', spacing, doc templates and moving usings within namespaces are common violations. I imagine this will be a lot of work over time.
3) I think the context menus would be cleaner without including the filename (no other VS commands have the name there)
4) On Join lines; it’d be great to special case comments like so:
/// <summary> foo </summary> (losing the ///)
Furthermore if you could make it so that join lines did a line break after any closing tag or a column limit – that’d be even better!
5) The UI doesn’t work that well with VS2012 dark theme (especially Spade and options) can you grab the colouring from the UI?
6) Dragging and dropping members in the Spade sometimes causes padding line breaks to be lost or double up
That’s all for now! I hope these comments are useful!
Hi Lex -
Thanks for all of the feedback - those comments are useful. CodeMaid has a public Trello board where feature requests are kept with comments and voting as input to new releases. You can find it here: https://trello.com/board/future/4f6e6dcc255ed1e9085b8665
1. Existing Trello card here: https://trello.com/c/1rqRkYcb
2. StyleCop isn't just about reorganization logic, so I don't think that would be a good fit.
3. New Trello card here: https://trello.com/c/bfRmdeBt
4. I like that - New Trello card here: https://trello.com/c/NHEdlLFs
5. Existing Trello card here: https://trello.com/c/T75b9klZ That's the most popular feature right now, I'm just trying to get my designer on it. ;)
6. I recommend running cleanup after reorganization to update padding lines.
Thanks again, :)
Great product! I am doing some Arduino development (C/C++ type files) that have the extension of .pde or .ino. While the keyboard shortcut in VS2010 will reformat code (ctrl-E, F), CodeMaid doesn't seem to work on these files. The editor is set up with the editing experience of Visual C++ for these extension types.
Thanks, I'm glad you like it. :)
My guess is that those files are not being reported as C/C++ file types if CodeMaid isn't recognizing them. Perhaps they are identified as a different language by Visual Studio?
The language service is retrieved differently based on whether not a document is open. Do you see the same behavior when right-clicking within an open document, and right-clicking on the file in the solution explorer window? That might help me narrow in a little on a difference. If you have a small sample project you can send over I should be able to debug it pretty easily to see what is coming out.
I was wondering if there is a way to add your own blocks of things to do like for example I don't like lines AFTER the #Region xxx.
Or the ones that you display are the only ones you allow?
Correct, pragma statements are not currently recognized by Spade. I've added a backlog card to Trello for voting/discussion of that feature here: https://trello.com/c/kVXEFvkd
Thanks for the suggestion. :)