@@ -62,16 +62,22 @@ var (
62
62
skipPrefixes = []string {
63
63
// boring stuff
64
64
"vendor/" , "tests/testdata/" , "build/" ,
65
+
65
66
// don't relicense vendored sources
66
67
"cmd/internal/browser" ,
68
+ "common/bitutil/bitutil" ,
69
+ "common/prque/" ,
67
70
"consensus/ethash/xor.go" ,
68
71
"crypto/bn256/" ,
69
72
"crypto/ecies/" ,
70
- "crypto/secp256k1/curve.go" ,
71
- "crypto/sha3/" ,
73
+ "graphql/graphiql.go" ,
72
74
"internal/jsre/deps" ,
73
75
"log/" ,
74
- "common/bitutil/bitutil" ,
76
+ "metrics/" ,
77
+ "signer/rules/deps" ,
78
+
79
+ // skip special licenses
80
+ "crypto/secp256k1" , // Relicensed to BSD-3 via https://github.com/ethereum/go-ethereum/pull/17225
75
81
}
76
82
77
83
// paths with this prefix are licensed as GPL. all other files are LGPL.
@@ -144,6 +150,13 @@ func (i info) gpl() bool {
144
150
return false
145
151
}
146
152
153
+ // authors implements the sort.Interface for strings in case-insensitive mode.
154
+ type authors []string
155
+
156
+ func (as authors ) Len () int { return len (as ) }
157
+ func (as authors ) Less (i , j int ) bool { return strings .ToLower (as [i ]) < strings .ToLower (as [j ]) }
158
+ func (as authors ) Swap (i , j int ) { as [i ], as [j ] = as [j ], as [i ] }
159
+
147
160
func main () {
148
161
var (
149
162
files = getFiles ()
@@ -263,7 +276,7 @@ func mailmapLookup(authors []string) []string {
263
276
264
277
func writeAuthors (files []string ) {
265
278
merge := make (map [string ]bool )
266
- // Add authors that Git reports as contributorxs .
279
+ // Add authors that Git reports as contributors .
267
280
// This is the primary source of author information.
268
281
for _ , a := range gitAuthors (files ) {
269
282
merge [a ] = true
@@ -279,7 +292,7 @@ func writeAuthors(files []string) {
279
292
for a := range merge {
280
293
result = append (result , a )
281
294
}
282
- sort .Strings ( result )
295
+ sort .Sort ( authors ( result ) )
283
296
content := new (bytes.Buffer )
284
297
content .WriteString (authorsFileHeader )
285
298
for _ , a := range result {
0 commit comments