Verissimo SystemVerilog Testbench Linter User Guide
Rev. 20.1.26, 30 July 2020

Chapter 6. Custom Report

The lint report can also be exported in a custom text format by using the batch mode flag gen_custom_report followed by either the path to a template file in FreeMarker syntax or one of the predefined templates: FAILURES_TEXT, FAILURES_JSON, FAILURES_XML. To specify the path to where the custom report will be generated use the custom_report_location flag. To generate a predefined template use the batch mode flag gen_custom_report_ftl followed by the available predefined templates.

The content of the generated custom report is dictated by the custom report template. One and only one custom report will be generated from a gen_custom_report <template.ext.ftl> argument. If you want to generate a CSV file, that contains commas between the output values, you will use a template that contains those commas (along with the required API for the values). To generate a text file without any commas between values, a different template that doesn't contain any commas must be used. So, the custom report template sets the format of the generated custom report which can be any type of text file format: CSV, TXT, XML, JSON, etc.

The filename of the generated custom report will always be the same as the template filename without the last extension. So using the argument gen_custom_report template.ext.ftl will generate a template.ext custom report because the .ftl was removed. If the template filename has no extension then the filename of the generated custom report will be the name of the template with the extension added. So using the argument gen_custom_report template will generate a custom report.

The custom report template uses the standard FreeMarker syntax (see FreeMarker Template Language Reference). Various information about the linting results can be obtained using the API available on the ${linter} variable.

Main API

  • isPassed(): returns a boolean representing the linter FAILED / PASSED status

  • getChecks(): returns a list of all the checks

  • getHits(): returns a list of all the hits

  • getFiles(boolean includeUVM): returns a list of all the files (use true for includeUVM to also include the UVM files, false otherwise)

  • getAnnotationNames(): returns a list of all the annotations

  • getChecksSummary(): returns the summary of passed, failed, warning, info, disabled, nonexistent checks

  • getHitsSummary(): returns the summary of failed, warning, info and disabled hits

  • getNofCompiledLines(): returns the total number of compiled lines

  • getLintRunTime(): returns the linting run time in ms

  • getBuildRunTime(): returns the build run time in ms

  • getLicenseWaitTime(): returns the license wait time in ms

  • getEnvVar(String varName): returns the value of the varName environment variable

Check API

  • getId()

  • getTitle()

  • getName()

  • getDescription()

  • getCategory()

  • getCategoryDescription()

  • getStatus()

  • getSeverity()

  • getHits()

  • getRunTime()


  • getCheck()

  • getDetails()

  • getSeverity()

  • getFile()

  • getLine()

  • getAnnotations() - returns a map (Freemarker hash) with the annotation name as key and annotation value as value

  • getAnnotations(String annotationName)

  • getCompareInfo() returns a compare information object - only for compare reports

File API

  • getName()

  • getHits()

  • isPreWaivedFor(String checkName) - returns a boolean indicating if the file is pre-waived for specified checkName (use ALL_CHECKS to determine if the file is pre-waived for all checks and ANY_CHECK to determine if the file is pre-waived for any check)

Checks Summary API

  • getNofPassed()

  • getNofErrors()

  • getNofWarnings()

  • getNofInfos()

  • getNofDisabled()

  • getNofNonexistent()

  • getNofDuplicate()

Hits Summary API

  • getNofDisabled()

  • getNofErrors()

  • getNofWarnings()

  • getNofInfos()

Compare Info API

  • getAnnotations() returns a list containing compare annotations such as "New Failures", "New Fixes", "Removed Rules", "Added Rules", "Common"

  • getOtherStatus() returns the severity of the corresponding failure (e.g. for a common failure that has changed it's severity from warning to error)

  • getOrigin() returns "Current" or "Baseline" depending on the origin of the failure.