In this section:

Introduction

Parasoft supports Ruby by integrating with RuboCop, an open source static analysis tool for Ruby source code. RuboCop reports issues related to Ruby programming style and conventions. Refer to the RuboCop documentation for a more detailed description: https://rubocop.readthedocs.io/en/latest/ and https://github.com/rubocop-hq/rubocop

The Parasoft RuboCop extension processes the result file output from your open source static analysis tool, generates reports showing violations and severities for the code authors, and sends the data to Parasoft DTP. DTP presents the data in widgets, reports, and other interfaces that enable you to prioritize violations, place them into remediation workflows, and monitor progress toward improving the code quality. 

Requirements

  • RuboCop version 1.23.0 is currently supported.
  • Supported operating systems: Windows, Linux.
  • RuboCop should be installed and successfully running analysis.
  • RuboCop should be producing reports in JSON format. Use the --format json --out <file> parameter during RuboCop execution to specify JSON output. Example:

    rubocop --format json --out results.json

Usage

  1. If you have not already done so, execute RuboCop and verify that the results are output to a file in JSON format.
  2. Open a command prompt and navigate to the Multi-Language Pack installation directory.
  3. Execute the multilanguage-pack.bat or multilanguage-pack.sh script with the required parameters all on one line, e.g.:
multilanguage-pack.bat -tool RuboCop -results.file "c:\sample\rubocop-results.json" -source.dir "C:\sample\sampleProjectFolder"

Internal technical log files from the Multi-Language Pack execution are generated in the <INSTALL>/.mlp subdirectory.

Required Parameters

The following settings are required.

tool

This setting specifies the Parasoft extension to execute. Use -tool RuboCop to run the RuboCop extension.

results

The path to the RuboCop JSON results file. 

source.dir

Specifies the path to the Ruby source code. This is used to collect source control metadata (e.g., authorship, last updated, etc.) for DTP reporting and processing.

  • No labels