Main Content

Analysis Engine Options Available in Polyspace as You Code

R2026b

A subset of analysis options available with Polyspace® Bug Finder™ are also applicable to Polyspace as You Code™. The tables in this topic list the applicable options and link to their reference pages in the Polyspace Bug Finder documentation.

Setting Analysis Engine Options

You can specify analysis engine options in several ways:

  • Options file — Create a text file with one option per line and provide it through your IDE extension settings:

    • In Visual Studio®, specify the file path in Other Analysis Option File.

    • In Visual Studio Code, specify the file path in Analysis Options: Other Analysis Options File.

    • In Eclipse™, specify the file path in Other options file.

    For more information on option file syntax, see Options Files for Polyspace Analysis (Polyspace Bug Finder).

  • Command line — If you run polyspace-as-you-code from a terminal, specify options directly on the command line or use -options-file to point to an options file.

Note the following:

  • If you use one of the IDE integrations, you do not need to specify the -sources option. The extension automatically analyzes the currently open file.

  • Checkers options, such as -checkers, -misra3, -autosar-cpp14, and so on, do not need to be specified as analysis engine options. All IDE integrations have a Checkers File setting that allows you to configure which checkers to enable.

  • Target and compiler options such as -compiler, -target, -D, and -I can be automatically generated from your build configuration. In the IDE extension settings, configure Polyspace as You Code to extract these options from existing build artifacts:

Analysis Engine Options

Bug Finder Analysis

OptionDescription
-checkers -disable-checkers (Polyspace Bug Finder)Enable or disable defect checkers
-checkers-activation-file (Polyspace Bug Finder)Activate custom combination of defects and coding rules for Polyspace Bug Finder analysis
-do-not-generate-results-for (Polyspace Bug Finder)Do not generate results for specified headers or folders
-fast-analysis (Polyspace Bug Finder)Run analysis using faster local mode
-generate-results-for (Polyspace Bug Finder)Generate results for sources and specified headers or folders
-autosar-cpp14 (Polyspace Bug Finder)Check for violations of AUTOSAR C++ 14 rules
-cert-c (Polyspace Bug Finder)Check for violations of CERT® C rules and recommendations
-cert-cpp (Polyspace Bug Finder)Check for violations of CERT C++ rules
-custom-rules (Polyspace Bug Finder)Follow naming conventions for identifiers
-cwe (Polyspace Bug Finder)Check for weaknesses in your code that are enumerated in CWE
-guidelines (Polyspace Bug Finder)Check for violations of Guidelines
-iso-17961 (Polyspace Bug Finder)Check for violations of ISO®/IEC TS 17961 rules
-jsf-coding-rules (Polyspace Bug Finder)Check for violations of JSF® C++ rules
-misra-c-2023 (Polyspace Bug Finder)Check for violations of MISRA C™:2023 rules and directives
-misra-c-2025 (Polyspace Bug Finder)Check for violations of MISRA C:2025 rules and directives
-misra-cpp (Polyspace Bug Finder)Check for violations of MISRA™ C++:2008 rules
-misra-cpp-2023 (Polyspace Bug Finder)Check for violations of MISRA C++:2023 rules and directives
-misra3 (Polyspace Bug Finder)Check for violations of MISRA C:2012 rules and directives

Checkers Behavior

OptionDescription
-allowed-pragmas (Polyspace Bug Finder)Specify pragmas to allow during coding rules checking
-boolean-types (Polyspace Bug Finder)Specify effective boolean types for coding rules checking
-consider-analysis-perimeter-as-trust-boundary (Polyspace Bug Finder)Consider the analysis perimeter as trust boundary so that data coming from outside the current analysis perimeter is considered tainted
-consider-switch-as-single-decision (Polyspace Bug Finder)Compute cyclomatic complexity assuming a switch-case statement to be a single decision point
-create-checkers (Polyspace Bug Finder)Create new checkers for Polyspace Bug Finder analysis
-detect-atomic-data-race (Polyspace Bug Finder)Enable detecting data race with atomic operation
-detect-bad-float-op-on-zero (Polyspace Bug Finder)Detect floating point comparison with equality operator when one of the operands is 0.0
-start-level-from-one (Polyspace Bug Finder)Start counting the call level or nesting level from one

Check Behavior

OptionDescription
-allow-non-finite-floats (Polyspace Bug Finder)Enable an analysis mode that incorporates infinities and NaNs

General Options

OptionDescription
-author (Polyspace Bug Finder)Specify author name for reports
-date (Polyspace Bug Finder)Specify date for reports
-documentation (Polyspace Bug Finder)Display Polyspace documentation in web browser
-ignore-code-annotations (Polyspace Bug Finder)Ignore C/C++ code annotations justifying Polyspace results and show all results as unreviewed
-import-comments (Polyspace Bug Finder)Import review information from previous analysis
-list-all-values (Polyspace Bug Finder)Display valid option arguments for a given command-line option
-max-processes (Polyspace Bug Finder)Specify maximum number of processes for analysis
-options-file (Polyspace Bug Finder)Run Polyspace using list of options
-results-dir (Polyspace Bug Finder)Specify the results folder
-sources (Polyspace Bug Finder)Add source files to Polyspace analysis
-sources-encoding (Polyspace Bug Finder)Specify the encoding of source files
-sources-list-file (Polyspace Bug Finder)Specify a file containing a list of source files to analyze
-timeout (Polyspace Bug Finder)Specify a time limit on your analysis
-tmp-dir-in-results-dir (Polyspace Bug Finder)Keep temporary files in results folder
-ver (Polyspace Bug Finder)Display system information for Polyspace products
-verif-version (Polyspace Bug Finder)Specify version for reports
-xml-annotations-description (Polyspace Bug Finder)Apply custom code annotations to Polyspace analysis results

Input and Stubbing

OptionDescription
-classification (Polyspace Bug Finder)Control precisely which files to include in Polyspace analysis and how to analyze them
-code-behavior-specifications (Polyspace Bug Finder)Associate behaviors with code elements such as functions
-data-range-specifications (Polyspace Bug Finder)Constrain global variables, function inputs and return values of stubbed functions
-functions-to-stub (Polyspace Bug Finder)Specify functions to stub during analysis
-library (Polyspace Bug Finder)Specify libraries that you use in your program
-termination-functions (Polyspace Bug Finder)Specify process termination functions

Multitasking

OptionDescription
-disable-concurrency-detection (Polyspace Bug Finder)Disable automatic detection of multitasking functions

Post Verification

OptionDescription
-post-analysis-command (Polyspace Bug Finder)Specify command or script to be executed after analysis

Precision

OptionDescription
-const-volatile-scalar-behaviorSpecify how to treat scalar variables declared as both const and volatile

Target and Compiler

OptionDescription
-D (Polyspace Bug Finder)Replace macros in preprocessed code
-I (Polyspace Bug Finder)Specify include paths
-U (Polyspace Bug Finder)Undefine macros in preprocessed code
-align (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-asm-begin -asm-end (Polyspace Bug Finder)Exclude compiler-specific asm functions from analysis
-big-endian (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-c-version (Polyspace Bug Finder)Specify C language standard followed in source code
-char-is-16bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-compiler (Polyspace Bug Finder)Specify the compiler that you use to build your source code for static analysis
-cpp-version (Polyspace Bug Finder)Specify C++ language standard followed in source code
-custom-target (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-default-sign-of-char (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-div-round-down (Polyspace Bug Finder)Round down quotients from division or modulus of negative numbers instead of rounding up
-dos (Polyspace Bug Finder)Consider that file paths are in MS-DOS style
-double-is-64bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-dump-preprocessing-info (Polyspace Bug Finder)Show all macros implicitly defined during a particular analysis
-enum-type-definition (Polyspace Bug Finder)Specify how to represent an enum with a base type
-ignore-pragma-pack (Polyspace Bug Finder)Ignore #pragma pack directives
-include (Polyspace Bug Finder)Specify files to be #include-ed by each C file in analysis
-int-is-32bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-lang (Polyspace Bug Finder)Specify language of source files
-little-endian (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-logical-signed-right-shift (Polyspace Bug Finder)Specify how to treat the sign bit for logical right shifts on signed variables
-long-is-32bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-long-long-is-64bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-no-uliterals (Polyspace Bug Finder)Disable support for universal character names in identifiers
-pack-alignment-value (Polyspace Bug Finder)Specify the pack alignment value
-pointer-is-24bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-pointer-is-32bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-post-preprocessing-command (Polyspace Bug Finder)Specify command or script to run on source files after preprocessing phase of analysis
-regex-replace-fmt -regex-replace-rgx (Polyspace Bug Finder)Make replacements in preprocessor directives
-sfr-types (Polyspace Bug Finder)Specify special function register types and sizes
-short-is-8bits (Polyspace Bug Finder)Specify size of data types and endianness by creating your own target processor
-size-t-type-is (Polyspace Bug Finder)Specify the underlying data type of size_t
-target (Polyspace Bug Finder)Specify size of data types and endianness by selecting a predefined target processor or creating a custom processor
-wchar-t-is (Polyspace Bug Finder)Specify whether wchar_t is a keyword or typedef
-wchar-t-type-is (Polyspace Bug Finder)Specify the underlying data type of wchar_t

See Also

Topics