|
|
After completing the analysis of a new version of your project, you will probably want to investigate how it has evolved, more specifically for which artefacts the quality has decreased. Let's look at the history of the Earth Project (which should be available if your Squore administrator has created the sample projects shipped with the Squore installation) to find out how to spot the worst-scored components in your project.
Log into Squore as the demo user using demo
/demo
and observe the evolution of the Earth project in the
Project Portfolios:
The trend arrows before the version names in the the Project Portfolios indicate that the overall rating has not changed (More information about the quality indicator icons is available in the section called “Where Are My Analysis Results?”.). If you take a closer look at the Technical Debt Trend chart however, you can notice that the technical debt is growing for this project.
Since the trend accelerated in V6, we will focus on this version. Let's click V6 in the tree and start our evaluation by looking at the score card, which rates Earth at E.
Let's also look at the Developer dashboard, which offers more insight into coding violations. Select View As > Developer in the Explorer menu:
Some values under Artefact Counting, Line Counting and Issue Distribution explain the lower score: the application contains more files and functions, more lines of code, less comments and more rules violations.
By now you probably want to find out which components in your project are responsible for increasing the technical debt the application in this version. If you want the Artefact Tree to reflect this information, you can change the sort order to show the worst scores first by clicking on the sort icon () and selecting LEVEL > Worst first to display artefacts from worst-scored to best-scored.
In this section, you will learn to look for artefacts the hard way by using filters and search. For a more automated way to find artefact that fit a specific category, take a look at the section called “Finding Artefacts Using Highlights”.
Click the Filter icon () above the Artefact Tree to show the filter options and select only the levels F and lower:
Click Apply to apply the changes, and the Artefact Tree should refresh to show only artefacts in the levels selected, as shown below:
The notice Filter active is always displayed above the Artefact Tree when you are using a filter. The tree now only shows artefacts rated F and lower, along with their ancestors (i.e. their parents and ancestors), even though the ancestors may not be rated F and lower.
While a filter is active, you can still search for other artefacts by typing a search term in the search box. Try typing ma in the search box above the Artefact Tree, and watch the search results list get populated as you type:
If you select the first search result in the list above,
you will open the dashboard for machine.c
.
Let's go back to our filtered tree. The filter singled out two artefacts with the
required score range: player.c
and
robot.c
. The artefact player.c deteriorated in
version 6. Click on the artefact player.c
to view its
dashboard. Note how the score card indicates that the artefact has more blocker issues than
in the previous analysis.
You can click the link in the table to directly view the new blocker violation on the Findings tab. In this case, the rule NOFALLTHROUGH was broken:
Another convenient way to try and find why a project's quality is deteriorating is to filter on the trend of an artefact.
Select the current version of Earth again and edit the active filter: Uncheck the boxes for levels F and lower, and select the Deteriorated category in the Evolution column. When applying the filter, you should see the artefacts in the tree that have the icon next to their name.
The functions you looked at earlier are still here, but there are more deteriorated artefacts
that you can start reviewing. If you click on
hi_scores_disp(int)
for example, which is rated E.
In order to find out where the degradation took place, you can look at the indicators tree to understand where the decline in quality comes from. Expand all the nodes in the indicators tree to reveal the issues with the artefact:
Squore makes it easy to spot the irregularities quickly, like the fact that the Maintainability Non Conformity indicator is one of the causes for the worse score in this version. This is probably the first item to review in this function.
Take a look at the Coding Rules Compliance section of the artefact's scorecard to confirm the results:
By clicking the link icon, you can directly view the violations for this artefact in the Findings tab.
You can dive further into the analysis results by looking at the information contained in other tabs and assign action items to your team by referring to Chapter 6, Managing Your To-Do List With Squore or report your progress as explained in Chapter 9, Communicating With Squore.
In the previous section (the section called “Finding Artefacts Using Filters and Search”), you got familiar with searching and filtering to find the artefact that have a negative impact on the overall rating of a project. in this section, you will learn to master the Highlights functionality, which aims to make the process of finding certain categories of artefacts easier.
Highlights are flat lists of artefacts ordered in predefined categories for a model.
Let's try to confirm our findings about the worst and most deteriorated artefacts in Earth. Click on the current version of Earth and clear the filter. Click the Highlights tab of the Explorer and select the Top 10 worst artefacts category. The list appears as shown below:
The list confirms that the artefacts with the worst rating are player.c and robot.c. The Highlights table shows you the artefact rating, name and path, and allows you to go to the artefact's dashboard directly by clicking the artefact name.
Now you can also find the deteriorated artefact hi_scores_disp(int) that you identified with a filter earlier in the section called “Finding Artefacts Using Filters and Search”: select the Top 10 most deteriorated artefacts highlight category to see the artefact appear in the list of deteriorated artefacts in this version.
Artefacts are sorted by degradation, i.e. the difference between the value of the main indicator in the previous baseline version compared to the current value. By clicking the Export button, you can export the selected items to a CSV file. If the Export button is greyed out, your licence does not include the option to export data to CSV files.
By default, the list of most deteriorated artefacts is compiled based on the previous version. By using the Reference list in the Explorer Settings menu ()and choosing another reference version, you can update the statistics based on the new reference version you just selected.
Note: The notions of baseline and draft versions is explained in the section called “Working with Draft and Baseline Versions”.
Squore administrators can customise and expand this list by referring to the Squore Configuration Guide.