Tag: Structural Search and Replace

Hadi Hariri describes Structural Search and Replace: a way to create and apply custom code inspections and quick-fixes in ReSharper 5 and above. It is very helpful in cases like adopting new .NET Framework and third-party library APIs. Full video of this session is available at http://tv.jetbrains.net/videocontent/resharper-tips-and-tricks-live-sess...

In this impromptu session at NDC 2011, Hadi Hariri gives an hour worth of ReSharper tips and tricks. He covers multiple features related to navigation, generating code, selecting and rearranging code, refactoring code and project items, and using structural search and replace to create custom code inspections. He also discovers unexpected bugs in a pre-release ReSharper build that he's using, and highlights some of the new features for web developers introduced in ReSharper 6.

This screencast demonstrates IDEA's static code analysis features and how to write your own rule using Structural Search & Replace. I'll give you a quick overview of IDEA inspections, show you how to use Structural Search, and then demonstate creating a new inspection and quick fix based on this search.

Do you have tons of unit tests using the old style Assert.AreEqual assertions? Want to change them quickly to new style Assert.That notation? ReSharper to the rescue! Use the new 'Search with Pattern' feature.