Continuous Inspection

COBOL Autocontrol

The COBOL plugin enables analysis and reporting on COBOL projects.
Enterprise Edition: € 2,500
Professional Edition: € 2,500
Sonar platform:
All prices for one license per year per instance including support, upgrades, maintenance.
Download and install if you already have a full or trial key.

Features

COBOL Autocontrol is a product intended for developers, enabling them to perform a local pre-commit quality analysis on programs, in order to monitor the quality standards and remediate defects, before pushing the work into SCM.

Accessible from any Development Environment, Autocontrol generates on-demand a report providing data about volume and type (critical, major, minor) of rule violations that have been newly detected in the developer’s code. This differential report is based on the last reference analysis available on the Sonar platform server.

autocontrol-12

This HTML report displays an exhaustive list of programs impacted by rule violations, and helps the developer to easily correct programs prior to the next commit. For each program, violated rules are diplayed with the corresponding line number and code sample.

Autocontrol filters

Dynamic filters are actionable from the report, allowing quick wins against quality drift:

  • By displaying only the new violations, avoiding deterioration of code compliance.
  • By sorting programs by rule severity, keeping the focus only on critical violations.

To ensure consistency in the remediation effort of the developer, the rules used with Autocontrol to generate the report are exactly those activated in the Sonar platform quality model.

Installation and Configuration

The plugin should be installed into the /extensions/plugins directory. The file should be extracted and used as an analyzer on the developer’s machine. The file conf/sonar-autocontrol.properties should be used to configure the connection to the Sonar server and DB. The one constraint with Autocontrol is that it can only work against a project that has a flat structure with all files under the root.

Usage

To get help, run ./sonar-autocontrol.sh -h. Then run ./sonar-autocontrol.sh -K the_key_of_the_project_in_sonar file_to_analyze. This will output an HTML file in the same directory by default.

By default, properties defined on the server will be used, but you can override them on the command line:

-Dsonar.cobol.copy.directories=XXX -Dsonar.cobol.acucobol.preprocessor.directives.directories=XXX

Notes

  • The quality profile to be used will be the one found on the server for this project (can be overwritten with advanced properties).
  • Custom COBOL extension rules have to be declared in sonar-autocontrol.properties in order to be taken into account.