Skip to main content

handle_cfg_command

Function handle_cfg_command 

Source
pub fn handle_cfg_command(
    path: &Path,
    output: Option<&str>,
) -> Result<(), Box<dyn Error>>
Expand description

Handle CFG (Control Flow Graph) command

Generates a control flow graph for the specified file.

§Arguments

  • path - The file to analyze
  • output - Optional output file path for DOT format

§Examples

use codesearch::commands::graph::handle_cfg_command;
use std::path::Path;

handle_cfg_command(Path::new("src/main.rs"), None).unwrap();