R# 6.0: How do I clean up redundant initializers and join declarations across a file?
I'm working in VS2010 on a codebase that started (15 years ago) in Fortran, got ported to VB6, then autotranslated to VB.Net, and finally autotranslated to C# by C-Sharpener. (Stop laughing, it's not that funny...)
As you can imagine, the translated code has some oddities. Two of the annoying ones are: 1) declarations of all variables at the top of each function, 2) C-Sharpener has added VB-style initialization code to each declaration, as VB guarantees initialized variables and C# doesn't.
I can use the context menu items "Remove redundant initializer" and the move/joins to fix the issues by hand. This is tedious across a 100k line codebase :-). How can I automate it?
Thanks in advance for any ideas,
- Peter
Please sign in to leave a comment.
Hello Peter,
At the moment there's no built-in functionality in ReSharper to automate
this process, however you can do this by writing a plug-in for ReSharper.
For more information take a look at http://tinyurl.com/d68nb6t. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"