Currently, using the --fullpath with --match-d options causes cloc to evaluate the regex based on the physical full path, but this might not align with what users expect.
For instance, if I aim to match ./foo/src/ exclusively, but excluding ./src/ or ./next/foo/src/, I must set --match-d="^$(pwd)/foo/src/".
Moreover, when working with git diff, it becomes quite a hassle. The diff generates temporary directories with names that are hard to retrieve.
I propose aligning cloc's working path as a virtual root to address these issues, much like git does.
Then we can use match-d=^/foo/src/ to match paths relative to the project.
Currently, using the
--fullpathwith--match-doptions causes cloc to evaluate the regex based on the physical full path, but this might not align with what users expect.For instance, if I aim to match
./foo/src/exclusively, but excluding./src/or./next/foo/src/, I must set--match-d="^$(pwd)/foo/src/".Moreover, when working with git diff, it becomes quite a hassle. The diff generates temporary directories with names that are hard to retrieve.
I propose aligning cloc's working path as a virtual root to address these issues, much like git does.
Then we can use
match-d=^/foo/src/to match paths relative to the project.