Abstract: Learn about the new CodeCheck in 7.0 with better integration, new reports, and multiple inspections.
Over a year ago, I hatched my plot to kick CodeCheck out of Understand into a standalone tool. Unfortunately, my plot failed. Fortunately, many of the cool features planned for an independent CodeCheck found a new home in Understand 7.0.
Better Integration
My main complaint with the way CodeCheck worked before was that it felt separate from the rest of Understand. Opening it took over most of the screen and my ability to choose where I wanted my windows. It didn’t sync very much to the rest of Understand and Understand couldn’t sync to it.
So, in Understand 7.0, CodeCheck is part of the family. Instead of taking over a document window, inspections are managed in a docked window. Views on the data are still in document windows, but now each in their own window. So I can place them side by side in a split workspace, or release them. Syncing also works, allowing me to view violation details from CodeCheck in the information browser, and have the previewer update to violation locations.
Custom CodeCheck Reports
In the screenshot above, you may have noticed a few other changes. The results table now looks an awful lot like the new ireports. In fact, it is an interactive report. That one happens to be built-in, but the great news is that you can write your own reports for CodeCheck results!
Before writing your own, though, let’s take a look at the new built-in reports available for CodeCheck. Internally, the most used CodeCheck view is the results locator. The Results Table, shown in the screenshot above, replaces that view.
More exciting to me, because they have pretty charts and multiple pages, are the Results by Check and Results by File.
Results By Check / Compliance
The default Results by Check report shows a bubble chart with violations by check and a table listing each check. Clicking on a check changes the page to focus on just that check.
This default view is tailored more towards engineers. However, the report was initially designed to be a compliance report for managers, so with a few option tweaks, you can get a compliance report.
There is also a python ireport for the original compliance reports introduced before 7.0. You can use it directly or customize it until it reaches your needs.
Results By File
The results by file report provides a layered view allowing you to drill deeper into problem areas. Instead of clusters, the tree map shows only what’s on that level. Going another page updates the treemap for the new layer and updates the breadcrumbs at the top of the report.
Overview / Cover Page
Both the Results By File and Results By Check have a cover page so that all needed information is in exported reports. You can also open the cover page directly with the “Overview” report.
Multiple Inspections
The other major change with the new CodeCheck is multiple inspections. In older versions of Understand CodeCheck only had the current result. If you ran it twice in a row, the first result was replaced by the second result.
Not so with 7.0. Now each inspection is saved. This means inspections can be compared and tracked over time. In addition to reports and treemaps, CodeCheck has a web dashboard similar to the Welcome Page and Project Home page. The web page shows a cool trend chart over time, and allows comparing inspections to see what’s new and fixed.
Baselines
Multiple inspections also allows for an important new change to baselining. Previously, creating a baseline created a lot of wildcard ignores. This means that sometimes too many things got ignored. Now, a baseline is a previous inspection, allowing much better comparison of what is actually new and the ability to see what was fixed.
So check out the new CodeCheck! We’d love to hear how you use CodeCheck and what reports and features would most help you.