Some of the internal code details aren't available with the current VS API, but the new Roslyn compiler in VS14 will provide a lot more information that will make those kind of cleanups possible in the future. If you have specific requests check out the Roslyn list in the backlog: https://trello.com/b/VVxVhbQv/backlog
I've also added a new card to the backlog for reorganizing selected files, great idea: https://trello.com/c/cAOyUtUR
I may have missed something here but I have not found it. I always like to know what changes are going to be made before anything goes making them. So being able to scan the solution then review the suggested changes would be a must for me.
as a test I created a simple VS2013 MFC application with various classes and code then ran CodeMaid Clean up All Code. The result was then not able to be compiled a CodeMaid removed the EOF character from the end of the .rc2 file, so I would be very fearful of running this on larger projects.
Thanks for the constructive criticism, that is very helpful.
For that specific item with the .rc2 EOF indicator not being on a separate line, Issue #18 opened and resolved for the next minor release. There is a "Remove end of file trailing new line" option that could be disabled in the interim.
I've also placed a card in the backlog to investigate adding integration tests that would iterate across all the different project templates and invoke CodeMaid actions upon them. https://trello.com/c/Sqv2bIWC
First its awesome and second its awesome, very light weight and incredible. But for some reasons it doesn't work on solution level clean-up all. I have mix projects in solution, ASP.NET MVC, Web API, Silverlight, WCF, Windows Service etc.. and total around 50+ projects excluding unit test projects :)... if it work at solution level then save more time for me and save me 50+ individual project level clicks...
VS2013 had a known issue with solution level cleanups being disabled. They fixed it recently with Update 2. If that doesn't do the trick a shortcut is you can multi-select projects and do cleanup on several at once. Also feel free to open a BitBucket issue and we can figure it out if it wasn't the VS update.
I think this is a great tool, and special thanks to taking time to write it.
If I run CodeMaid becomes
I.e. it looses indentation of the parameters,
How can I disable it?
Hi Sumonto -
Thanks for your kind comments.
I wasn't able to reproduce this, but I suspect it could be a similar issue to the other one you posted (see next reply to consolidate).
Hope it helps,
Thanks for your reply, however I could not find an option under
"Tools->Options->Text Editor->C/C++->Formatting->Spacing" to disable "
To disable "function param indentation" issue?
Is there any way you could help me more.
Is there a way to just sort methods alphabetically regardless of access or type? I tried looking into Formatting but I need to either go with access before type or type before access. I want to ignore both type and access and just sort the entire thing by name.
Currently no, I don't think there's a configuration that would match your request. You may make a feature request on the Trello backlog (https://trello.com/b/VVxVhbQv/backlog) or the code is open source if you would like to look to add it (https://github.com/codecadwallader/codemaid)
Is there a way to leave the variable declaration indentation un-touched.
ShortType1 st1 = 0;
LongLongType longtype = 0;
ShortType1 st1 = 0;
LongLongType longtype = 0;
Is there a way to disable this?
CodeMaid invokes Visual Studio's native formatting, and then extends upon it. The removal of spaces in variable declarations is done by Visual Studio's formatting, and you can see the same behavior if you invoke Edit->Advanced->Format Document. You can tell CodeMaid not to invoke Visual Studio's native formatting at CodeMaid->Options->Visual Studio->"Run format document", but you would lose several other cleanup actions in the process. You can also look for additional Visual Studio configuration options under Tools->Options->Text Editor->C/C++->Formatting->Spacing.
Thanks, I really appreciate hearing that. :)
It should be possible. I don't think there is an existing card in the backlog for that feature, would you like to add one? https://trello.com/b/VVxVhbQv/backlog
There is a card in our backlog to support Python here: https://trello.com/c/RcqeuQEi
Please feel free to vote/comment on it. The card also includes a link to the pull request showing how PHP support was added as an example for what it would take to add support for Python.
I'm using VS Premium 2013, Update 5 and CodeMaid v 0.8.0. Selecting the "Find In Solution Explorer" results in the exception message, "The Command to execute is not enabled." How do I enable the Command?
Are you sure the currently active document exists within the solution?
If you are still having issues, please open an issue on GitHub (https://github.com/codecadwallader/codemaid/issues), including information about what type of file you are trying to find (e.g. C#, VB, etc.)
When opening large classes, say with 5k lines in it, spade may take more than a minute to load.
Is it expected behavior? Most of the time, when opening a class you may need to user visual studio, but it hangs for that amount of time. Perhaps, if Spade would load asynchronouslly on background, might imnprove performance in this case.
Additionally, it might check the cache first, and then load async. It will take about the same time to load, but will definitely avoind disrupting work. If you need to use it as soon as opening a class, you may just wait for it.
Spade does load asynchronously in the background. Please check your settings at CodeMaid->Options->"Load models asynchronously". This setting is on by default, but if it has been turned off then you would see the behavior you described.
If you are still having an issue, please open an issue on GitHub here with more details (e.g. VS version, configuration settings): https://github.com/codecadwallader/codemaid/issues
I opening my solution while got alert message it says check ActiityLog.xml.
The file content show as below.
System.InvalidOperationException: Unexpected false at Roslyn.Utilities.Contract.ThrowIfFalse(Boolean condition, String message) at Microsoft.CodeAnalysis.Editor.Shared.Tagging.ProducerPopulatedTagSource`1.GetTagIntervalTreeForBuffer(ITextBuffer buffer) at Microsoft.CodeAnalysis.Editor.Shared.Tagging.AsynchronousTagger`1.GetTags(NormalizedSnapshotSpanCollection requestedSpans) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__38.MoveNext()
We have been seeing that too with the VS2015 RC. It's been reported, and we have a fix that will be coming out soon. Details and workarounds here (spoiler: you can ignore that warning) https://github.com/codecadwallader/codemaid/issues/118
Hello first of all, I want to say thank you, I was using this extension for several years and it was great.
BTW I just figure out lately that it is not removing the unused using statement, this is the first happened to me. so what i did is check the configuration. On the inside the Cleaning->Visual Studio the "Run remove unused using statements" option is check.
I am using the codemaid 0.8.0 on VS2013 update 5
You're welcome, I'm glad you've been enjoying it.
There is an additional clause for removal of unused using statements. By default, it will skip running that operation during an automatic cleanup on save. The reason for this is that when a build, triggers a save, which triggers a cleanup, in some scenarios it could cause Visual Studio to lock up. This was mostly noticed with VS2012, but the default option has been kept the same. If you manually invoke CodeMaid, then by default it will go ahead with removing the unused using statements.
I hope that helps. If it doesn't, can you please open an issue on GitHub along with a minimal code sample? https://github.com/codecadwallader/codemaid/issues