pub fn generate_codeowners(
features: &[Feature],
base_path: &Path,
project_dir: Option<&Path>,
output_dir: &Path,
codeowners_path_override: Option<&Path>,
owner_prefix: &str,
) -> Result<()>Expand description
Generate or update a CODEOWNERS file with feature ownership information.
§Arguments
features- List of features to generate CODEOWNERS entries forbase_path- Base path of the project (where features are located)project_dir- Optional project directory to calculate relative pathsoutput_dir- Directory where the CODEOWNERS file should be createdcodeowners_path_override- Optional custom path and filename for CODEOWNERS fileowner_prefix- Prefix to add to owner names (default: “@”)
§Behavior
- Creates CODEOWNERS if it doesn’t exist
- Updates existing CODEOWNERS while preserving custom content
- Generated content is placed between section markers
- Content outside markers is preserved
- Paths are normalized with forward slashes and leading
/ - Owners automatically get the specified prefix if not already present