We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44af8ca commit ddaeb9bCopy full SHA for ddaeb9b
1 file changed
scripts/autoharness_analyzer/src/parse_scanner_output.rs
@@ -10,6 +10,9 @@ use std::path::Path;
10
// Parse the CSV files that the Kani `scanner` tool outputs
11
// and store which functions are safe and unsafe
12
13
+// Number of columns in {crate_name}_scan_functions.csv.
14
+const SCANNER_COLS: usize = 6;
15
+
16
/// Single row of data in {crate_name}_scan_functions.csv
17
#[derive(Debug, Deserialize)]
18
#[allow(dead_code)]
@@ -58,9 +61,10 @@ fn parse_row(
58
61
fields: Vec<&str>,
59
62
line_number: usize,
60
63
) -> Result<()> {
- if fields.len() != 5 {
64
+ if fields.len() != SCANNER_COLS {
65
bail!(
- "Expected 5 fields, got {} in line {}. Fields: {:?}",
66
+ "Expected {} fields, got {} in line {}. Fields: {:?}",
67
+ SCANNER_COLS,
68
fields.len(),
69
line_number,
70
fields
0 commit comments