Ceedling icon indicating copy to clipboard operation
Ceedling copied to clipboard

Feature Request: Allow `module:create` Command to Check Specific Paths

Open wonhee-kim opened this issue 10 months ago • 1 comments

Hello,

I would like to request a feature enhancement for the module:create command in Ceedling.

Current Behavior

The module:create command currently checks only the first entry in the :source path and creates files in that directory. This behavior can lead to issues where files are created even if they already exist in subdirectories of the specified path.

Desired Behavior

I would like the module:create command to allow specifying a particular path or set of paths to check before creating files. This would ensure that files are not created if they already exist in any specified path or subdirectory.

Example

Given the following project.yml configuration:

:paths:
  :source:
    - D:/Unit_Test/AAA/**
    - D:/Unit_Test/AAA/BBB/**
    - D:/Unit_Test/AAA/BBB/CCC/**

The module:create command should allow specifying a particular path or set of paths to check before creating files. For example:
ceedling module:create[<module_name>] --paths=D:/Unit_Test/AAA/BBB/,Unit_Test/AAA/BBB/CCC/

Benefits
This enhancement would prevent the creation of duplicate files and ensure that the module:create command behaves more intuitively by considering specified paths.

Thank you for considering this feature request.

Best regards

wonhee-kim avatar Feb 20 '25 06:02 wonhee-kim

Hi @wonhee-kim -- your desired behavior is still valid, but I also want to bring up that you don't have the current behavior fully captured here. Perhaps you are unaware that the module generator will search through the paths specified in project.yml to find the closest match? I'll refer you to the section on paths in the plugin's readme

mvandervoord avatar Feb 20 '25 14:02 mvandervoord