pub fn find_task_files(start: &Path) -> Vec<(PathBuf, TaskFile)>Expand description
Search for task files from start upward, nearest first. In each
directory the first of tasks.md, maskfile.md, README.md that parses to
at least one job is taken.
The walk stops at the first file found, unless that file opts in with a
file-level Opts: include-parent before its first task heading. A file that
opts in is layered under by its own parent, on the same terms, so a chain
continues only as far as every link agrees.
Inheritance has to be opt-in because the walk previously ran to the
filesystem root, and every file it passed could define or shadow a task
name. Running mdtask build in a freshly cloned repository could therefore
run a script from a directory above it, chosen by a file the caller never
looked at and quite possibly did not know existed. Stopping at the first file
means what runs is what is written in the file you can see from where you are
standing, and a project that genuinely wants a shared baseline says so.
Where layering does happen, it is child-first: a nearer file shadows a
farther one by job name, like just’s set fallback.
Embedders with their own project root can ignore this and call parse.