Skip to main content

stern4rust/
runner.rs

1// Copyright 2025 Umberto Gotti <umberto.gotti@umbertogotti.dev>
2// Licensed under the MIT License
3// SPDX-License-Identifier: MIT
4
5use anyhow::Result;
6
7use crate::args::Args;
8use crate::config::Config;
9
10pub struct Runner;
11
12impl Runner {
13    pub fn run(args: Args) -> Result<()> {
14        let config = Config {
15            manifest_path: args.manifest_path,
16            packages: args.packages,
17        };
18
19        println!("stern4rust report");
20        println!();
21        println!("No rule is implemented yet, so nothing can fail.");
22        println!(
23            "summary: packages_requested={} manifest_path={}",
24            config.packages.len(),
25            config
26                .manifest_path
27                .as_deref()
28                .map_or_else(|| "<default>".into(), |path| path.display().to_string())
29        );
30
31        Ok(())
32    }
33}