Great tool. However, it doesn't seem to format VB as well as C#. One thing I noticed is it does not add an empty line between functions. Running CodeMaid on the below will not add an empty line between Foo and Bar.
Public Class Class1 Public Function Foo() As Integer Return 1 End Function Public Function Bar() As Integer Return 2 End Function End Class
Hi, Great Extension. By default, *.rc2 files should be excluded. If you remove the last CR/LF at the end of those files (ie if the file doesn't end with an empty line), the project doesn't compile anymore. Fred
This "great" plugin destroyed one week of work. Im really angry, cleaning up singel files works good, but when it came to cleaning up the whole solution it is deleting whole files! Big fat warning to everybody! DO NOT CLEAN THE WHOLE SOLUTION AS MENTIONED!
I'm very sorry to hear that happened to you. I have not heard of it happening before to anyone else, and I'd like to determine a root cause if you have any interest in pursuing it further. Please contact me directly via codemaid on gmail if you would like to discuss.
That's odd that you'd be seeing intermittent behavior like that. Have you tried the classic uninstall/reinstall technique? If that doesn't help please report some more details on BitBucket and we can take a look: https://bitbucket.org/s_cadwallader/codemaid/issues
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.
Currently CodeMaid has two themes (dark and light) to match the Visual Studio themes. The tool window backgrounds are #FF252526 and #FFF6F6F6 respectively. By default CodeMaid will auto-detect the IDE tool window background color and choose one of the two themes from there.
Feature requests can be added to the backlog here: https://trello.com/b/VVxVhbQv/backlog
Or the relevant source code is available here:
Hope it helps.
Cool, glad to hear it. :)
We've moved over to GitHub this weekend, so if you've got something you think is generic enough you'd like to include in the main code line you can submit a pull request there. If not no worries too.
I have "Remove end of line whitespace" checked, but that option doesn't delete whitespace that exists on a blank line. (i.e. a line with whitespace only.) Is there a way to tell CodeMaid that I want ALL trailing whitespace to be removed? CodeMaid version is 0.7.1. Visual Studio version is Professional 2012 Update 4.
Glad you figured it out. Visual Studio does have the concept of a virtual cursor position - that's how the next line of code looks to be indented to the same level before you start writing anything. If you press the 'end' key you'll see it toggle between the virtual end of line and actual end of line, or you can enable viewing whitspace.
CodeMaid shouldn't(tm) be related to any settings about highlighting unused variables. I don't know that Visual Studio does that by default, I think it comes from other third party extensions like ReSharper.
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.
I have the same problem, just today! And before I found the codemaid settings lost, I made an update of Visual Studio 2013 (Update 1). Thus, although I can not say this for sure, the lost settings may correspond to updates made in VisualStudio.
When i right click a solution and click 'clean all code...' i get below error message. This is in VS2013 update 1
Microsoft Visual Studio
Could not load file or assembly 'Microsoft.VisualStudio.Package.LanguageService.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
This is a known Microsoft bug in VS2013. They've promised to fix it in VS2013 Update 2.
Please follow through this issue for details on a workaround: https://bitbucket.org/s_cadwallader/codemaid/issue/220/vs2013-cleanup-all-code-shows-error
After install codemaid, i'm using visual studio 2010, and use the extension my visual studio stop running and when i start again, i got the same result. I have uninstalled the codemaid extensioni and there is not any problem again. Do you have some setting or patch for this issue?
I'm not sure if this will help the problem you are describing, but there is a known issue that some users have encountered with multithreading performance. You can disable that optimization through CodeMaid->Configuration->General->"Multithread options". This is the default in the latest BETA release.
If that isn't the problem, please open an issue on BitBucket (https://bitbucket.org/s_cadwallader/codemaid/issues) including some details such as what you are doing when the error occurs, any relevant screenshots, and if the issue occurs consistently or erratically.