Skip to main content

big_code_analysis/output/
mod.rs

1#[cfg(test)]
2pub(crate) mod test_support;
3
4pub(crate) mod color;
5pub use color::ColorMode;
6
7pub(crate) mod dump;
8pub use dump::*;
9
10pub(crate) mod dump_metrics;
11pub use dump_metrics::*;
12
13pub(crate) mod dump_ops;
14pub use dump_ops::*;
15
16pub mod offenders;
17pub use offenders::{OffenderRecord, Severity, TOOL_ID};
18
19pub(crate) mod numfmt;
20
21pub mod checkstyle;
22pub use checkstyle::write_checkstyle;
23
24pub(crate) mod funcspace_row;
25
26pub mod csv;
27pub use csv::{CSV_EXTENSION, CSV_HEADER, defang_formula, write_csv, write_csv_aggregate};
28
29pub mod sarif;
30pub use sarif::{write_sarif, write_sarif_with_suppressed};
31
32pub mod code_climate;
33pub use code_climate::write_code_climate;
34
35pub mod warning_line;
36pub use warning_line::{write_clang_warning, write_msvc_warning};
37
38/// The `(child, own)` ASCII prefix pair for one line of the `metrics` and
39/// `ops` text trees: what the node contributes to its children's
40/// indentation, and the connector on its own line. `` `-  `` closes a
41/// subtree, `|- ` continues it.
42///
43/// Shared by [`dump_metrics`] and [`dump_ops`], which render the same
44/// glyph vocabulary over two different trees, so the two mirrored walks
45/// cannot drift apart. The AST dump ([`dump`]) deliberately uses Unicode
46/// box-drawing glyphs instead and has its own connector type.
47pub(crate) const fn branch_glyphs(last: bool) -> (&'static str, &'static str) {
48    if last { ("   ", "`- ") } else { ("|  ", "|- ") }
49}