Developing Custom SonarQube Rules for Java

Track

Technologies & Solutions

Date and time

Monday, 10. October 2022., 14:30

Room

Hall B

Duration

45'

Having code quality in mind when developing is very important and by following best practices you can save yourselves a lot of trouble down the line.

SonarQube is one of the tools that allows us to better track issues in the code and also helps us prevent them while programming. The Sonar tools are widely used in Java development, but in most cases only the predefined set of rules is used.

In this workshop I will demonstrate how you can extend the default rule suite from SonarQube with your own custom-made rules. This can be particular useful if you work with the technologies not supported by the Sonar ruleset or you would like to enforce some internal guidelines for which the rules do not already exist. The presentation will mainly consist of a live coding session in which I'll show how to create custom Sonar rules for Java. Utilizing a template project provided by SonarSource, I will create a new custom rule and accompanying unit tests. Once created, the rule will be deployed to a local SonarQube instance and added to the quality profile. After everything is configured, I will demonstrate rule usage from the end-user perspective when developing in IntelliJ with help of the SonarLint plugin.

Lecture details

Talk Attendence: Attendance in person
Type: Workshop
Level of difficulty: Detailed
Desirable listeners function: Software Developer or Architect
Group of activity: Technologies & Solutions

About speaker

Organizers

The conference is organized by the Croatian Association of Oracle users & Croatian Java Users Association. 

Like us on Facebook

We post news, photos and other interesting facts on official JavaCro Facebook Page.

Follow us on Twitter

Keep up to date with all the news on Twitter!

Platinum Sponsor

Golden sponsors

Silver sponsor

Media Sponsor