Translating JavaScript and TypeScript Code

You can analyze JavaScript projects that contain JavaScript, TypeScript, JSX, and TSX source files, as well as JavaScript embedded in HTML files.

Some JavaScript frameworks are transpiled (source-to-source compilation) to plain JavaScript, which is generated code. Use the -exclude command-line option to exclude this type of code.

When you translate JavaScript and TypeScript code, make sure that you specify all source files together in one invocation. Fortify Static Code Analyzer does not support adding new files to the file list associated with the build ID on subsequent invocations.

Fortify Static Code Analyzer does not translate minified JavaScript (*.min.js).

Note: There are some types of minified JavaScript files that Fortify Static Code Analyzer cannot automatically detect for exclusion from the translation. Use the -exclude command-line option to exclude these files directly.

This section contains the following topics: