Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Sonar Code Quality Testing Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Sonar Code Quality Testing Essentials

Sonar Code Quality Testing Essentials

By : Charalampos S Arapidis
3.5 (4)
close
close
Sonar Code Quality Testing Essentials

Sonar Code Quality Testing Essentials

3.5 (4)
By: Charalampos S Arapidis

Overview of this book

Sonar is an open source platform used by development teams to manage source code quality. Sonar has been developed with this main objective in mind: make code quality management accessible to everyone with minimal effort. As such, Sonar provides code analyzers, reporting tools, manual reviews, defect-hunting modules, and TimeMachine as core functionalities. It also comes with a plugin mechanism enabling the community to extend the functionality, making Sonar the one-stop-shop for source code quality by addressing not only the developer's requirements, but also the manager's needs.The "Sonar Code Quality Testing Essentials" book will help you understand the different factors that define code quality and how to improve your own or your team's code using Sonar. You will learn to use Sonar effectively and explore the quality of your source code in the following axes: Coding Standards Documentation and Comments Potential Bugs and Defects Unit Testing Coverage Design and Complexity Through practical examples, you will customize Sonar components and widgets to identify areas where your source code is lacking. The book goes down to proposing good practices and common solutions that you can put to use to improve such code.You will start with installing and setting up a Sonar server and performing your first project analysis. Then you will go through the process of creating a custom and balanced quality profile exploring all Sonar components through practical examples. After reading the book, you will be able to analyze any project using Sonar and know how to read and evaluate quality metrics.Hunting potential bugs and eliminating complexity are the hottest topics regarding code quality. The book will guide you through the process of finding such problematic areas, leveraging and customizing the most appropriate components. Knowing the best tool for each task is essential. While you improve code and design through the book, you will notice that metrics go high and alerts turn green. You will use the Time Machine and the Timeline to examine how your changes affected the quality."Sonar Code Quality Testing Essentials" will enable you to perform custom quality analysis on any Java project and quickly gain insight on even large code bases, as well as provide possible solutions to code defects and complexity matters.
Table of Contents (18 chapters)
close
close
Sonar Code Quality Testing Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Sonar Metrics Index

Locating undocumented code


The Comments & Duplications widget inside the project dashboard provides an overview about documentation. From there we can further browse to undocumented classes by clicking on a metric and finally getting down to source code. A typical workflow would be to:

  1. 1. Click on the Comments or the Public Undocumented API metric displayed in the widget.

  2. 2. Select a package to drill down or a class from the list.

    If you select a class, the source viewer opens up focused on the Source tab. Read on the header of the source viewer and locate the Comments metrics and the Public documented API on the third and fourth column.

  3. 3. Click on the Violations tab.

  4. 4. Filter the source viewer selecting Javadoc-related violations from the select menu.

Creating the documentation filter

To provide a view regarding documentation and comments for all projects, we can create a custom filter including filtered information on these topics. Log in as Administrator and from Sonar's main page...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY