JS: handle additional multi-license file patterns

This commit is contained in:
Esben Sparre Andreasen
2018-12-11 09:55:38 +01:00
parent edbef289a7
commit 73aa223b08
3 changed files with 9 additions and 2 deletions

View File

@@ -222,10 +222,10 @@ predicate isMultiLicenseBundle(TopLevel tl) {
)
) > 1
or
// case: ordinary block comments with "@license" lines
// case: ordinary block comments lines that start with a license
count(BlockComment head |
head.getTopLevel() = tl and
head.getLine(_).regexpMatch("(?i)[\\s*]*@license\\b.*")
head.getLine(_).regexpMatch("(?i)[\\s*]*(@license\\b.*|The [a-z0-9-]+ License (\\([a-z0-9-]+\\))?\\s*)")
) > 1
}