This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a6d309  Add some line normalize processor for help 
`skywalking-satellite` dependency resolve (#79)
3a6d309 is described below

commit 3a6d3090d78b7c104cb55ce4cc63a4333d66ecd0
Author: mrproliu <[email protected]>
AuthorDate: Wed Oct 13 09:29:15 2021 +0800

    Add some line normalize processor for help `skywalking-satellite` 
dependency resolve (#79)
---
 pkg/license/norm.go | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/pkg/license/norm.go b/pkg/license/norm.go
index f6977b3..c1caa26 100644
--- a/pkg/license/norm.go
+++ b/pkg/license/norm.go
@@ -164,8 +164,8 @@ var (
                        "Neither the name of the copyright holder nor the names 
of its contributors may be used to endorse",
                },
                {
-                       regexp.MustCompile(`(?i)(neither the name of) (.+?) 
(nor the names of)`),
-                       "$1 the copyright holder $3",
+                       regexp.MustCompile(`(?i)(neither the name)( of)? (.+?) 
(nor the names)( of( its authors and)?)?( its)?`),
+                       "$1 the copyright holder $4",
                },
                {
                        regexp.MustCompile(`(?i)you may not use this 
(file|library) except`),
@@ -195,7 +195,17 @@ var (
                // BSD-3-Clause
                // MIT
                { // remove optional header
-                       regexp.MustCompile(`(?im)^\s*\(?(The )?MIT License( 
\((MIT|Expat)\))?\)?$`),
+                       regexp.MustCompile(`(?im)^\s*\(?(The )?MIT License( 
\((MIT|Expat)\))?\)?\s*$`),
+                       "",
+               },
+               // The Three Clause BSD License 
(http://(http://en.wikipedia.org/wiki/bsd_licenses)
+               { // remove optional header
+                       regexp.MustCompile(`(?im)^\s*?the (two|three)? clause 
bsd license (\(http(s)?://(\w|\.|/)+\))?$`),
+                       "",
+               },
+               // BSD 3-Clause License
+               { // remove optional header
+                       regexp.MustCompile(`(?im)^\s*?bsd ([23])-clause 
license\s*$`),
                        "",
                },
                // ISC
@@ -225,8 +235,14 @@ var (
                        " ",
                },
                // Copyright (c) .....
+               // © Copyright .....
                {
-                       regexp.MustCompile(`(?m)^\s*Copyright (\([cC©]\))?.+$`),
+                       regexp.MustCompile(`(?m)^\s*([cC©])?\s*Copyright 
(\([cC©]\))?.+$`),
+                       "",
+               },
+               // Portions Copyright (C) ...
+               {
+                       regexp.MustCompile(`(?m)^\s*Portions Copyright 
(\([cC©]\))?.+$`),
                        "",
                },
                // All rights reserved
@@ -234,6 +250,11 @@ var (
                        regexp.MustCompile(`(?m)^\s*All rights reserved\.?$`),
                        "",
                },
+               // ... is distributed under the Simplified BSD License:
+               {
+                       regexp.MustCompile(`(?im)^\s*.+ is distributed under 
the Simplified BSD License\:?$`),
+                       "",
+               },
 
                // This should be the last one processor
                {

Reply via email to