-
Notifications
You must be signed in to change notification settings - Fork 886
Check AGPL code doesn't import enterprise #3602
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
Conversation
Signed-off-by: Spike Curtis <[email protected]>
Signed-off-by: Spike Curtis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I was too slow with my review 😄.
Btw, I looked at the linked issue; this last comment makes it sound like it would be possible? quasilyte/go-ruleguard#78 (comment)
cdroot | ||
|
||
set +e | ||
find . -regex ".*\.go" | grep -v "./enterprise" | xargs grep -n "github.com/coder/coder/enterprise" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find . -regex ".*\.go" | grep -v "./enterprise" | xargs grep -n "github.com/coder/coder/enterprise" | |
find . -name ./enterprise -prune -o -name '*.go' -print0 | xargs -0 grep -n "github.com/coder/coder/enterprise" |
Not at a computer; so can’t test. But use if you want. Silly tool optimization. This even handles spaces in names which isn’t ever going to be a problem with Go source files 🤪
@mafredri it is possible to match on file names, which is one requirement, but it is not possible to match the |
This adds a check to ensure we don't accidentally import enterprise code from AGPL code, which would cause "AGPL" builds to not really be AGPL.
Oh, and if you are wondering, "can ruleguard do this?," the answer is no