Skip to main content

Module output

Module output 

Source
Expand description

Output formatters: CSV, SARIF, Checkstyle, clang/MSVC warning lines, and AST/metric pretty-dumps used by bca and the offender reporters.

The most commonly used writers (write_csv, write_sarif, write_checkstyle, write_clang_warning, write_code_climate, write_msvc_warning) and shared types (OffenderRecord, Severity, TOOL_ID, CSV_HEADER, CSV_EXTENSION) are also re-exported at the crate root.

Re-exports§

pub use offenders::OffenderRecord;
pub use offenders::Severity;
pub use offenders::TOOL_ID;
pub use checkstyle::write_checkstyle;
pub use csv::CSV_EXTENSION;
pub use csv::CSV_HEADER;
pub use csv::defang_formula;
pub use csv::write_csv;
pub use csv::write_csv_aggregate;
pub use sarif::write_sarif;
pub use sarif::write_sarif_with_suppressed;
pub use code_climate::write_code_climate;
pub use warning_line::write_clang_warning;
pub use warning_line::write_msvc_warning;

Modules§

checkstyle
Checkstyle 4.3 XML writer for OffenderRecord batches.
code_climate
GitLab Code Climate JSON writer for OffenderRecord batches.
csv
CSV writer for FuncSpace trees.
offenders
Offender records consumed by CI/IDE output formats.
sarif
SARIF 2.1.0 writer for OffenderRecord batches.
warning_line
Compiler-warning line writers for OffenderRecord batches.

Enums§

ColorMode
Whether the terminal dump serializers (crate::dump_root, crate::dump_ops, crate::dump_node, crate::dump_function_spans) emit ANSI color escapes.

Functions§

dump_node
Dumps the AST of a code.
dump_node_with_color
Like dump_node, but the caller selects the ColorMode.
dump_ops
Dumps all operands and operators of a code.
dump_ops_with_color
Like dump_ops, but the caller selects the ColorMode.
dump_root
Dumps the metrics of a code.
dump_root_with_color
Like dump_root, but the caller selects the ColorMode.