Building a Build Server – Finding Potential Problems in your Code

In last week’s article, we explored how to set up JetBrains’ dupFinder, which is part of the ReSharper Command Line Tools. In this article, we are going to set up the code inspection tool from the same package.

In case you missed it, the tool setup can be found in the previous article, titled Building a Build Server – Finding Duplicate Code Blocks in your Source.

Installing Jenkins plugins

The plugin that is going to collect the result for this build step is the Warnings Plug-in. You can install it by going to Manage Jenkins / Manage Plugins from the main page of your Jenkins installation and selecting it from the Available tab.

Testing the tool

After we successfully installed the Jenkins plugin, let’s create a build project to check how to integrate the tool with the build system. We are going to use the CodeDuplicates repository from the previous article.

Source Code Management

Use Git source code management with

Repositories

Repository URL

https://github.com/atzimler/CodeDuplicates.git

   

Branches to build

Branch specifier (blank for ‘any’)

*/master

Repository browser:

(Auto)

Build

Execute Windows batch command

Command

C:\ReSharperCLT\inspectcode.exe –output=InspectCodeReport.xml CodeDuplicates.sln

Post-build Actions

Scan for compiler warnings

Scan workspace files

File pattern

InspectCodeReport.xml

Parser

Resharper InspectCode

And that’s all. After we successfully build this project, there is going to be a Resharper InspectCode Warnings on the project menu where we can explore the various warnings from the ReSharper tool.

You can connect with me on LinkedIn or Twitter. Share if you found this article useful.

By subscribing to the email list, you will be notified about new posts.
Loading
No comments yet.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Powered by WordPress. Designed by WooThemes