Skip to content

Commit ddaeb9b

Browse files
author
Carolyn Zech
committed
fix expected number of columns
1 parent 44af8ca commit ddaeb9b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/autoharness_analyzer/src/parse_scanner_output.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ use std::path::Path;
1010
// Parse the CSV files that the Kani `scanner` tool outputs
1111
// and store which functions are safe and unsafe
1212

13+
// Number of columns in {crate_name}_scan_functions.csv.
14+
const SCANNER_COLS: usize = 6;
15+
1316
/// Single row of data in {crate_name}_scan_functions.csv
1417
#[derive(Debug, Deserialize)]
1518
#[allow(dead_code)]
@@ -58,9 +61,10 @@ fn parse_row(
5861
fields: Vec<&str>,
5962
line_number: usize,
6063
) -> Result<()> {
61-
if fields.len() != 5 {
64+
if fields.len() != SCANNER_COLS {
6265
bail!(
63-
"Expected 5 fields, got {} in line {}. Fields: {:?}",
66+
"Expected {} fields, got {} in line {}. Fields: {:?}",
67+
SCANNER_COLS,
6468
fields.len(),
6569
line_number,
6670
fields

0 commit comments

Comments
 (0)