polyspace-access -set-unassigned-findings
Assign owners to unassigned results
Description
The system command polyspace-access -set-unassigned-findings
assigns owners to unassigned results in the specified Polyspace®
Access™ project.
polyspace-access -set-unassigned-findings
assigns owners to unassigned results in a project in the Polyspace
Access database. You specify the project results using either the full path in
Polyspace
Access or the run ID. Use the <results>
-owner <user>
-source-contains <pattern>
... -owner <userN> -source-contains <patternN> [unassigned findings options]
-host <hostname>
[login options
] [output options
]unassigned findings options
to
assign results from different source files or different groups of source files to different
owners. To get the paths to projects and their last run IDs, use the polyspace-access -list-project
command.
Examples
If you follow a component-based development approach, you can assign analysis results by component to their respective owners.
Get a list of projects currently stored on the Polyspace Access database.
polyspace-access -list-project -host myAccessServer
Connecting to https://example-access-server:9443
Connecting as jsmith
Get project list with the last Run Id
Restricted/Code_Prover_Example (Code Prover) RUN_ID 14
multimodule/vxWorks_demo (Code Prover) RUN_ID 16
public/Bug_Finder_Example (Bug Finder) RUN_ID 24
public/CP/Code_Prover_Example (Polyspace Code Prover) RUN_ID 8
public/Polyspace (Code Prover) RUN_ID 28
Command Completed
Assign all red and orange run-time error results to the owner of all the files in
Component_A
of project vxWorks_demo
. Perform the
same assignment for the owner of Component_B
. To specify the
vxWorks_demo
project, use the run
ID.
polyspace-access -set-unassigned-findings 16 ^
-owner A_owner -source-contains Component_A ^
-owner B_owner -source-contains Component_B ^
-rte Red -rte Orange ^
-host myAccessServer
-source-contains
Component_A
matches all files with a file path that contains the string
Component_A
.Using the option -source-contains Component_B
matches all files
with a file path that contains the string Component_B
, but excludes
files with a file path that contains the string Component_A
.
Export the results and generate .csv
files for each owner that
contain the results assigned to
them.
polyspace-access -export 16 ^
-output C:\Polyspace_Workspace\myResults.csv ^
-output-per-owner ^
-host myAccessServer ^
myResults.csv
containing all results from the project with run ID
16. The command also generates files myResults.csv.A_owner.csv
and
myResults.csv.B_owner.csv
on the same file path.Input Arguments
Manage Project Run Labels
Path or run ID of the project results that you assign to a user, specified as a
string. Polyspace assigns a unique run ID to each analysis run you upload. If the path name
includes spaces, use double quotes. To get the project results path or last run ID, use
polyspace-access -list-project
.
Example: "public/Examples/Bug_Finder_Example (Bug
Finder)"
Example: 4
Username of user you assign as owner of unassigned results, specified as a string. To assign multiple owners, call the option for each user.
Each use of the -owner
option must be paired with the option
-source-contains
.
Example: -owner jsmith
Pattern to match against file path of project source files, specified as a string.
To match file paths for all source files, use "-source-contains
/
".
Enter a substring from the file path. You cannot use regular expressions.
When you use this option more than once, each instance excludes patterns from
previous instances. For example, -source-contains foo -source-contains
bar
matches all file paths that contain foo
, then all
file paths that contain bar
excluding paths that contain
foo
.
When you assign results to multiple owners, call this option for each call to
-owner
.
Example: -source-contains main
Options to assign all results or only a subset based on component or individual source files. To make an assignment, specify a pattern to match against the folder or file paths to assign.
Option | Description |
---|---|
| Type of run-time error result to assign, specified as
To specify more than one type of result, use the option for each type. Example: |
| Impact of defect results to assign, specified as
To specify more than one defect type, use the option for each type. Example: |
| Assign owner to all unassigned custom coding rules results. |
| Assign owner to all unassigned coding rules results. |
| Assign owner to all unassigned code metrics results. |
| Assign owner to all unassigned global variables results. |
| Assign owner to unassigned results that are new compared to the previous analysis run. If the project contains only one run, all results are new and you can omit this option. |
| Review status of the results to assign, specified as
To specify more than one status, use the option for each status. Example: |
| Severity of the results to assign. Specify To specify more than one severity, use the option for each severity. Example: |
| Display command output without making any assignment. Use this option to check that your assignments are correct. |
Connection Configuration
Polyspace Access machine hostname
that you specify in the URL
of the Polyspace
Access interface, such as
https://
.
If you are unsure about which hostname to use, contact your Polyspace
Access administrator. hostname
:portNumber
/metrics/index.html
You must specify a hostname with all polyspace-access
commands,
except the -generate-migration-commands
and
-encrypt-password
commands.
Example: -host myAccessServer
Port number that you specify in the URL of the Polyspace
Access interface, such as
https://
.
If you are unsure about which port number to use, contact your
Polyspace
Access administrator.hostname
:portNumber
/metrics/index.html
HTTP protocol used to access Polyspace
Access, specified as http
or
https
.
Full path to the text file where you store your login credentials. Use this option if you use a command that requires your Polyspace Access credentials in a script but you do not want to store your credentials in that script. While the script runs, someone inspecting currently running processes cannot see your credentials.
You can store only one set of credentials in the file, either as
-login
and -encrypted-password
entries on separate lines, for instance:
-login jsmith -encrypted-password LAMMMEACDMKEFELKMNDCONEAPECEEKPL
-api-key
entry:-api-key keyValue123
login.txt
in Linux®, use this
command:chmod go-rwx login.txt
API key you use as a login credential instead of providing your login and encrypted password. To assign an API key to a user, see Configure User Manager or contact your Polyspace Access administrator.
Use the API key if you use a command that requires your Polyspace Access login credentials as part of an automation script with a CI tool such as Jenkins®. If a user updates their password, you do not need to update the API key associated with that user in your scripts.
It is recommended that you store the API key in a text file and pass
that file to the command by using the -credentials-file
option.
Login username that you use to interact with Polyspace Access.
Use the options -login
and
-encryped-password
together. If you do not use
these two options together, you are prompted to enter your credentials
at the command line, unless you use -api-key
.
Login password you use to interact with Polyspace
Access. <ENCRYPTED_PASSWORD>
is the output
of the
command.polyspace-access -encrypt-password
Use the options -login
and
-encryped-password
together. If you do not use
these two options together, you are prompted to enter your credentials
at the command line, unless you use the -api-key
option.
Number of times the polyspace-access
command
retries to upload results when you upload from a client machine to the
server machine that hosts Polyspace
Access before failing. Specify this option to retry the upload
command in the event of sporadic network outages. The command waits 10
seconds between retries.
Full path to command outputs.
Path to the folder for storing temporary files generated by
polyspace-access
commands. The default folder
path depends on your platform:
Windows —
C:\Users\%username%\AppData\Local\Temp\ps_results_server
Linux —
tmp/ps_results_server
File path where you store the command output log. By default the command does not generate a log file.
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)