Skip to main content

write_project_starter

Function write_project_starter 

Source
pub fn write_project_starter(repo_path: &Path) -> Result<()>
Expand description

Write a starter project.devprune.json: a schema link, and the empty section.

Deliberately not a serialized PerRepoConfig::default. Every scalar key the project file names is a key it wins, so writing all of them out would have --team quietly take over every setting in the .devprune.json beside it — including the ones that file was created to hold. An empty team file decides nothing until the team decides something, and the $schema link is what makes deciding it a matter of autocomplete rather than of remembering the key names.

The one thing written out is the empty prunable.directories, which decides nothing either — an empty list adds no directories. It is there because a section nobody can see is a section nobody fills in, and this is the file a person or an agent is expected to fill in.

No ensure_in_git_exclude, and that omission is the entire point. [PerRepoConfig:: save_to_repo] hides what it writes because one person’s overrides are nobody else’s business; hiding this one would leave it identical to the file beside it and useful to nobody.