polyspace.project.StaticAnalysisConfigurationRef Class
Namespace: polyspace.project
(Python) Manage references from project to external static analysis configurations
Since R2026a
Description
This Python® class contains information about a static analysis configuration that is saved
in a .pscfg file, referenced by a Polyspace® Platform project. Saving your static analysis configurations in
.pscfg files and referencing those files from one or more projects
enables you to create a modular project structure that improves sharing and version control
managed workflows. For more information about project structure, see Modularize Project by Using External Configurations, Test References, and External Stub Files.
To work with external static analysis configurations, use this class, which contains the
name of the static analysis configuration and the path to the .pscfg file,
together with the polyspace.project.StaticAnalysisConfiguration class, which contains the static
analysis configuration.
To work with static analysis configurations that are attached to a specific project, see
polyspace.project.OwnedStaticAnalysisConfiguration.
Creation
Syntax
Description
Import Configuration by Reference
staticAnalysisConfigRef = proj.StaticAnalysisConfigurationRefs.add(
adds a reference from the project to the static analysis configuration
staticAnalysisConfig, staticAnalysisConfigRefName)staticAnalysisConfig, which is an existing
.pscfg file or a
polyspace.project.StaticAnalysisConfiguration object. The
Name property of the resulting
polyspace.project.StaticAnalysisConfigurationRef object is set to
staticAnalysisConfigRefName.
staticAnalysisConfigRef = proj.StaticAnalysisConfigurationRefs.add(
adds a reference from the project to an existing
staticAnalysisConfigRefObj)polyspace.project.StaticAnalysisConfigurationRef object
staticAnalysisConfigRefObj and inherits the configuration
name.
staticAnalysisConfigRef = proj.StaticAnalysisConfigurationRefs.add(
adds a reference from the project to an existing
staticAnalysisConfigRefObj, staticAnalysisConfigRefName)polyspace.project.StaticAnalysisConfigurationRef object
staticAnalysisConfigRefObj. Use the
staticAnalysisConfigRefName argument to set the
Name property of the resulting
staticAnalysisConfigRef object.
Convert Configuration
staticAnalysisConfigRef = proj.StaticAnalysisConfigurationRefs.moveAsRef(
converts the existing ownedStaticAnalysisConfigObj,staticAnalysisConfigFile)ownedStaticAnalysisConfigObj to a
polyspace.project.StaticAnalysisConfigurationRef object in the same
project. The conversion process saves ownedStaticAnalysisConfigObj in
staticAnalysisConfigFile.pscfg. You can specify
staticAnalysisConfigFile as an absolute or relative path, where
relative paths are considered relative to the location of the .psprjx
project file. The resulting
polyspace.project.StaticAnalysisConfigurationRef object has its
path set to staticAnalysisConfigFile and its Name
property is inherited from the owned static analysis configuration.
staticAnalysisConfigRef = proj.StaticAnalysisConfigurationRefs.moveAsRef(
converts the existing ownedStaticAnalysisConfigObj,staticAnalysisConfigFile, staticAnalysisConfigRefName)ownedStaticAnalysisConfigObj to a
polyspace.project.StaticAnalysisConfigurationRef object in the same
project. The conversion process saves ownedStaticAnalysisConfigObj in
staticAnalysisConfigFile.pscfg. You can specify
staticAnalysisConfigFile as an absolute or relative path, where
relative paths are considered relative to the location of the .psprjx
project file. The resulting
polyspace.project.StaticAnalysisConfigurationRef object has its
Path property set to staticAnalysisConfigFile
and its Name property is set by the
staticAnalysisConfigRefName argument you provide.
Input Arguments
Properties
Methods
Examples
Version History
Introduced in R2026a