Skip to content

Improve --fullpath and --match-d root path #731

Description

@PMExtra

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions