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

Recursive check pattern #136

Open
jwillker opened this issue Dec 15, 2022 · 1 comment
Open

Recursive check pattern #136

jwillker opened this issue Dec 15, 2022 · 1 comment

Comments

@jwillker
Copy link

I have many directories with go code. For the addlicence works, I have to do this:

docker run --rm -it -v ${PWD}:/src ghcr.io/google/addlicense \
       -check \
       -ignore "**/*.swagger.go" \
       -ignore "**/**/*.swagger.go" \
       */*/*.go
       **/**/**/**/**/**/*.go \
       **/**/**/**/**/*.go \
       **/**/**/**/*.go \
       **/**/**/*.go \
       **/**/*.go \
       **/*.go \
       *.go

Is there a better way only to check Golang code in any path? And ignore some file patterns in any path?

@hugosjoberg
Copy link

This also works:

find path/ -type f -name '*.go' -print0 | xargs -0 -n1  docker run --rm -it -v ${PWD}:/src ghcr.io/google/addlicense -check

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

No branches or pull requests

2 participants