-
Notifications
You must be signed in to change notification settings - Fork 171
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 does pattern work? #38
Comments
I took a deeper look last night and it doesn't look like this is actually implemented? If that's the case @nblair and I were thinking of doing so, if y'all would welcome a PR! |
This seems to be working for me with ./*.go and just individual filenames. What were you trying @DarthHater |
Basically, I just want to exclude stuff like |
@DarthHater For reference, there's a similar project: https://github.com/elastic/go-licenser Although it has less features, it'll walk the whole tree for you from the starting path you give it and will only apply the license to files that have the extension as defined by the I ended up having to use this other tool because |
cd packages/app find . -type d \( ! -name . \) -exec \ bash -c '/home/jp/go/bin/addlicense -c "Opstrace, Inc." -l apache {}/*.tsx' \; The pattern interpretation of addlicense is dubious. https://github.com/google/addlicense/blob/a0294312aa76d31c0bd7e49083d88a2a04d9b3d1/main.go google/addlicense#38 I therefore constructed the above's command so that addlicense *.tsx is invoked for each directory, and so that the * is interpreted by the shell. Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
cd packages/app find . -type d \( ! -name . \) -exec \ bash -c '/home/jp/go/bin/addlicense -c "Opstrace, Inc." -l apache {}/*.tsx' \; The pattern interpretation of addlicense is dubious. https://github.com/google/addlicense/blob/a0294312aa76d31c0bd7e49083d88a2a04d9b3d1/main.go google/addlicense#38 I therefore constructed the above's command so that addlicense *.tsx is invoked for each directory, and so that the * is interpreted by the shell. Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
Guys, Glob usage can be different due to terminal differences. I think the clearest way to use addlicense is using it with find command. |
@justmumu -- We ended up using |
Hello there,
I'm using this on
nancy
, and more or less, great tool!However, it's a bit too nuclear with the
.
pattern, and adding licenses to files that we need to exclude (primarily GitHub templates, but we also don't really need licenses on files that really don't have IP (Dockerfile, gorelease.yml, etc...), so I was looking at using the pattern to basically only check and apply to**/*.go
files, and maybe a couple others here and there. There isn't really much documentation I can see onpattern
, so I figured I'd ask about usage, and then send y'all a PR with it included in the README for other goofballs like myself!Cheers!
The text was updated successfully, but these errors were encountered: