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

How can I include all _test.go files by regex. #392

Open
myzhan opened this issue Jun 20, 2023 · 2 comments
Open

How can I include all _test.go files by regex. #392

myzhan opened this issue Jun 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@myzhan
Copy link

myzhan commented Jun 20, 2023

I need to walk through all _test.go files and get the lines of test code.

@myzhan
Copy link
Author

myzhan commented Jun 20, 2023

I try to use --remap-all to workaround.

scc -c --no-cocomo -i "go" --exclude-dir ".git,vendor" --remap-all "ginkgo":"Ginkgo test"

@boyter
Copy link
Owner

boyter commented Jun 21, 2023

Actually looking though there is no good way to do this. You might be able to do so though negative lookups such as

scc -M "\(?\!test\)"

Or some such...

I am in the middle of porting scc to use https://github.com/boyter/gocodewalker/ to get proper .gitignore support and when I do so I can map through the include stuff.

Going to add that on the todo pile which will ensure this can be done more easily.

@boyter boyter added the enhancement New feature or request label Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants