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

Implement copyright violation checker as part of CI #129

Closed
nyurik opened this issue Apr 7, 2021 · 9 comments
Closed

Implement copyright violation checker as part of CI #129

nyurik opened this issue Apr 7, 2021 · 9 comments
Labels

Comments

@nyurik
Copy link
Member

nyurik commented Apr 7, 2021

MapLibre need to prevent accidental copy/pasting of code from Mapbox 2.0 code. This feature should run during the CI PR workflow, doing a diff with the new 2.0 code to make sure the code wouldn't violate Mapbox's copyright.

@ambientlight
Copy link
Contributor

ambientlight commented Jul 21, 2021

@marcelnormann: I was looking into adapting https://github.com/platisd/duplicate-code-detection-tool that would scan over PR-vs-PRsAbovePRID (rather then file-vs-files) for this purpose, I will further feedback on it soon as I haven't really experimented with it yet, conceptually: filtering out all PRs prior to the 2.0 and running similarity against all changes in later PRs, but I haven't done anything similar before so I am curious how well it would work tbh

@marcelnormann
Copy link
Contributor

@ambientlight My idea so far was to extract all the lines of code from mapbox-gl-js that has been added after the license change and then run a search of code blocks in our PRs against it. Maybe it is a better idea to extract also all new lines of code from the maplibre repo so far and run your tool against both. Then similarity should be near to 0%.

@klokan
Copy link
Member

klokan commented Jul 21, 2021

We should extract all the code committed into Mapbox GL JS after their 2.0 release - and index it with a "plagiarism checker" used for schools assignments - as part of the CI / PR checks - and then check the new code in the PR against the index.

IMHO these tools don't handle individual files usually they work with blocks, and they also ignore different formatting of the source code - which may be practical...

@ambientlight
Copy link
Contributor

ambientlight commented Jul 21, 2021

Maybe it is a better idea to extract also all new lines of code from the maplibre repo so far and run your tool against both. Then similarity should be near to 0%.

This sounds like a better idea then mine, the similarity might not be near 0% exactly though, I wonder if common programming constructs will bump it to some base 5%-10%.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 17, 2021
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale label Apr 24, 2022
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 30 days with no activity.

@wipfli
Copy link
Contributor

wipfli commented May 24, 2022

Lets keep this one closed for now. After the TypeScript migration, I don't know if it will even be possible to get a copyright checker to work. Also the two projects will diverge over time more and more so that a comparison will become harder and harder.

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

No branches or pull requests

5 participants