Skip to content

Todo-marker shouldn't thwart whole program due to a disabled, optional feature #492

@MariTime-S

Description

@MariTime-S

Problem:

  • After running and producing results, the cwe_checker crashes with
thread 'main' panicked at src/caller/src/main.rs:374:13:
not yet implemented

  • no results are saved to output :(

How was the binary called?

$ cwe_checker -v --statistics -j -o CWE_results.json ./path/to/a/proprietary_binary

Expected outcome:

  • Catch "not implemented" before running / check on start-up not mid-runtime OR ignore flag and log
  • Not discard all results due to "todo"-marker

Offending code:

if args.statistics {
// TODO: Fix the `--statistics` flag.
//cwe_checker_lib::utils::log::add_debug_log_statistics(&mut all_logs);
todo!()
}

Proposed solution:

  • replace panic-inducing "not yet implemented" with verbosely ignoring a set --statistics flag

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions