JavaScript is not currently enabled, but is required for full
CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable
JavaScript in your browser: you will also need it for GUI
functionality.
If you opened this file directly from disk, your browser may be
directly suppressing JavaScript functionality: certain browsers
perform this suppression on local files (but not files delivered by
web servers) for security reasons.
-
If you access the manual through the hub's Web GUI, the
functionality will not be suppressed because the hub is a web
server.
-
Alternatively, your browser may allow you to explicitly
disable the security setting that suppresses functionality. See
the CodeSonar
FAQ for more information.
Output File Formats
CodeSonar GUI pages that contain data from the hub database can
be output to files in various formats. All GUI pages can be saved
as HTML.
Related Sections
Text, CSV, XML, JSON, SARIF,
and HTML versions of a GUI page (where available) can be obtained directly from that
page.
For Text, CSV, XML, JSON, or SARIF output:
- Navigate to the page you wish to output.
- Select the Text,
CSV, XML, JSON,
or SARIF link from the standard header.
Depending on your browser configuration, one of the following
will happen.
- The .txt, .csv, .xml, .json, or .sarif file will open directly in the
browser.
- The browser will ask whether you want to choose an
application to open the file or to save the file to disk.
- If the file is opened in your browser or another piece of
software, use the built-in save functionality to save the file to
your preferred location.
In general, the output file contents will reflect the contents of
the page as you are currently viiewing it. In particular, if the page
includes one or more tables:
- The exported table data will reflect your current column
selection.
SARIF output is an exception to this: exported SARIF files will
always contain all the data required to characterize each warning
with respect to the SARIF specification.
- All table rows are included in the output (independent of any
table pagination when
the HTML page is viewed in a web browser).
Note that the set of rows in the table will generally depend on
factors such as visibility
filter settings and (for search result tables) search terms.
For HTML output:
- Navigate to the page you wish to output.
- Use your browser's built-in save functionality to save the
page to your preferred location.
All GUI pages can be saved as HTML.
For the remaining output formats, see the table in section
GUI Reference: Page Type
Properties, which lists the available output formats for all GUI
page types.
If the data in a page is not primarily tabular, CodeSonar provides
plain text output in a format determined by the page type.
- The file extension is .txt.
- The link (in the page header) for obtaining the file is labeled
Text.
If the data in a page is primarily tabular, CodeSonar provides
output in CSV (comma-separated value) format compliant with RFC
4180.
- The file extension is .csv.
- The link (in the page header) for obtaining the file is labeled
CSV.
- The first line of the file contains the (comma-separated)
column headings for the table, the remaining lines contain the
table data.
For each GUI page type that provides XML output, the relevant
schema (.xsd) is listed in the
GUI reference page for that page type..All
XML schemas are located in $CSONAR/codesonar/py/hub/media/xmlschemas
In order to fully support internationalization, CodeSonar does not
require any single encoding of source code files. In cases where this
leads to ambiguity in interpretation, CodeSonar passes the ambiguity
through the entire system and back to the user so that it can be
appropriately decoded.
- Ambiguous characters are replaced by a Unicode character
reference from the "private use" space 0xe000..0xe0ff.
- In XML, these will show up as entities of the form &#e000; through &#e0ff;.
- To recover the original character code, subtract 0xe000. For example, if the entity
&#e013; appears in the XML, it
refers to the character with code 0x13 (0xe013
- 0xe000).
- All character codes are considered ambiguous
except (decimal) 9, 10, and the range 32-126
(inclusive).
If the data in a page is primarily tabular, CodeSonar provides
output in JSON (JavaScript Object Notation) format. For more
information about JSON, see the JSON
website.
- The file extension is .json.
- The link (in the page header) for obtaining the file is labeled
JSON.
- The file is structured as an object, where:
- The object contains a pair "rows":rowlist,
where rowlist is an
array of objects.
- Each object in the rowlist array corresponds to a row
of the table.
- Each name-value pair in a specific object in
rowlist describes a
table cell in the corresponding row: name is the column
heading, and value is the value in that column.
SARIF output is currently only available for the Analysis: Warnings, Warning Report, and Warning Search Results
pages.
- The file extension is .sarif.
- The link (in the page header) for obtaining the file is labeled
SARIF.
- The output file conforms to SARIF
v2.0.0-csd.2.beta.2018-11-28.
For more information about SARIF, see Static Analysis
Results Interchange Format.