You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In this section:

Introduction

Parasoft supports JavaScript by integrating with JSHint, an open-source tool that performs static analysis on JavaScript and HTML code and reports issues related to documentation, readability, and maintainability. Visit the JSHint website for additional information.

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

  • JSHint version 2.13.6 is currently supported.
  • JSHint should be installed and successfully running analysis.
  • JSHint should be producing XML reports in Checkstyle format (e.g., using the --reporter=checkstyle setting). See the JSHint documentation for details. 

Usage

  1. If you have not already done so, execute JSHint and verify that the results are output to a file in Checkstyle 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 JSHint -results.file "c:\sample\jshint-results.xml" -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 JSHint to run the JSHint extension.

results

The path to the JSHint XML results file. 

source.dir

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

  • No labels