Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude file names depending on path #93

Open
cclarkedt opened this issue Aug 6, 2024 · 1 comment · May be fixed by #94
Open

Exclude file names depending on path #93

cclarkedt opened this issue Aug 6, 2024 · 1 comment · May be fixed by #94

Comments

@cclarkedt
Copy link

The --not-match option only considers the base name.

Current behaviour:
Let's say I have the file structure:

.
├── app.py
└── test_dir
    └── app.py

And I want to exclude test_dir/app.py but not the root app.py, ideally I would use the supported regex format allowed by the --not-match option like below:

$ gocloc --not-match="(test_dir/app.py)" .     

However, this won't ignore the test file as I would like. This behaviour works the other way around too as if I wanted to ignore app.py but not test_dir/app.py, I might do:

$ gocloc --not-match="(app.py)" . 

But this will now ignore both of the files regardless of their location.

Desired behaviour:
For the file matching to account for the full path the file is being compared to.

@cclarkedt
Copy link
Author

@hhatto What are your thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant