From b012c1e6037ba3f89b9cdbd599f9d2650c1ad691 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Sun, 21 Jun 2026 11:38:21 +0300 Subject: Add module/function docs to cli.rs --- src/cli.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index b9f30fa..6ef93bb 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,3 +1,8 @@ +//! Command-line argument parsing for the main `repo2markdown` binary. +//! +//! This module defines the CLI shape and translates parsed arguments into internal rendering and +//! logging configuration. + use std::path::PathBuf; use clap::Parser; @@ -47,6 +52,10 @@ pub struct Cli { } impl Cli { + /// Converts CLI rendering flags into renderer options. + /// + /// These options control file-size limits and whether skipped files are represented by + /// placeholder entries in the generated Markdown. pub fn render_options(&self) -> RenderOptions { RenderOptions { max_file_size: self.max_file_size, @@ -55,6 +64,10 @@ impl Cli { } } + /// Returns the logging verbosity requested by the user. + /// + /// `--quiet` suppresses warnings and info messages, `--verbose` enables both warnings and info + /// messages, and the default mode emits warnings only. pub fn verbosity(&self) -> Verbosity { if self.quiet { Verbosity::Quiet -- cgit v1.3.1