You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find a way to detect licenses at the the beginning of files.
Return a description like "Rejected: license."
Background
Sometimes, people put the license of the program at the top of the script instead of the description. This is a case that we should be able to detect. Right now it's done by looking for a couple of key words. But this won't scale.
My current thinking is to
Build up an array of strings, which are the first line of licenses we've come across.
The first pass at solving this could be just two or more licenes (ie just enough to prove that the solution isn't a single hard coded string.)
This list will expand pretty quickly.
The list should be ordered in order of how frequently the licenses occur. Ie most common at the top. - Eg I'm guessing this will be a GPL of some form.
Test that the returned comment does not contain each license.
If it does, return a string like "Rejected: License." Ie it's not a comment.
The text was updated successfully, but these errors were encountered:
Task
Background
Sometimes, people put the license of the program at the top of the script instead of the description. This is a case that we should be able to detect. Right now it's done by looking for a couple of key words. But this won't scale.
My current thinking is to
The text was updated successfully, but these errors were encountered: