ReSharper: Great Code Quality Features

Posted by PR on

ReSharper is a JetBrains product that can be used within Visual Studio as an extension.

Figure:ReSharper is a JetBrains product that can be used within Visual Studio as an extension.

Even though it has been around for a while now, I wanted to briefly share my new experience using the JetBrains ReSharper plugin with Visual Studio 2022. My main impression: this is a game-changer for productivity and especially for code standards in a full-stack environment.

There are a number of license options available for businesses and individuals; at around $140 for an individual license, I think it is more than worth the cost for even casual development activities.

The plugin itself is very easy to install via the JetBrains Toolbox application manager and integrates seamlessly within Visual Studio's interface and Intellisense features - the out-of-box experience was almost exactly the way I wanted it to be. Changing the default behavior of the plugin is very easy via the dedicated settings interface - which I appreciate since it is a clean separation from the core Visual Studio settings. Since I develop in JavaScript when working on certain ASP.NET projects, the main setting I altered is enabling the JavaScript linting capabilities - this provides IntelliSense analysis and alerts for script code. I kept the default linter settings, but the configurability of this feature is huge for two main reasons - developers can pick and choose which linters are active for a given development session, and organizations can enforce their ideal coding standards via custom linting configurations, distributed to/configured for the entire development team.

The linting capabilities and code standards topics lead to my second point: awareness and enforcement of code quality rules. In my experience, code quality is difficult to enforce unless it is really easy to automate code reformatting - mainly due to the reason that it is yet another layer of process on top of everything else being juggled during development, check-ins, code reviews, etc. The code quality linting provided out-of-box by ReSharper is phenomenal and unobtrusive - so unobtrusive, that I didn't notice it for several days! Any code quality errors are lightly underlined with corrective-action tooltips that appear upon hover, similar to the default Intellisense UX, and a complete list of errors per page can be accessed via a dedicated icon. Resolving the errors is as simple as using the minimal UI to traverse the error locations and perform corrective action. The beauty of this is that the process of maintaining code quality can become simply ensuring no/only certain ReSharper code quality suggestions remain on files being developed. Super easy and does not interfere with workflow.

Hopefully this blurb will provide some insight into the usefulness of ReSharper from the perspective of a new user - it is amazing, for C# or full-stack ASP.NET development.

Copyright © ptr-cs