In this section

Introduction

Parasoft supports Objective-C by integrating with OCLint, an open source tool that performs static analysis on C, C++, and Objective-C code. OCLint reports possible bugs, unused code, complicated code, code smells, bad practices, and other issues. Refer to the OCLint website for additional information: http://oclint.org 

The Parasoft OCLint 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

  • OCLint version 21.10 is currently supported.
  • Supported operating systems: macOS, Linux
  • OCLint should be installed and successfully running static analysis
  • OCLint should be producing JSON reports. Generate JSON reports by running OCLint with the -report-type json option, e.g.:

    oclint -report-type json -o oclint-results.json <source> 

    If you are using a compile_commands.json file:

    oclint-json-compilation-database – -report-type json -o oclint-results.json
     
  • The JAVA_HOME environment variable must be set and pointing to your Java installation folder.

Usage

  1. If you have not already done so, execute OCLint 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 using the required parameters all one line, e.g.: 
multilanguage-pack.bat -tool oclint -results.file "/sample/oclint-results.json" -source.dir "/sample/sampleProjectFolder"

Required Parameters

The following settings are required.

tool

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

results.file

Specifies the path to the OCLint analysis results file.

source.dir

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

  • No labels