Expand description
Logic for the timebomb plant subcommand.
This module implements the core logic for inserting a timebomb fuse into a
source file at a specific line. It is intentionally defined with primitive
parameters so that it compiles independently of any PlantArgs struct
changes in cli.rs.
Functionsยง
- build_
annotation - Build the full annotation string.
- detect_
comment_ style - Return the comment prefix appropriate for the given file extension.
- find_
matching_ lines - Scan a file line-by-line and return all (1-based line number, line content)
pairs where the line contains
patternas a substring (case-sensitive). - insert_
line - Insert
new_linebefore the 1-basedline_numberinlines, returning the complete new file content as aString. - parse_
target - Parse
"path/to/file.rs:42"into(PathBuf, usize). - resolve_
date - Resolve the expiry
NaiveDatefrom the--dateor--in-daysarguments. - run_add
- Core logic for
timebomb plant.