File tree 2 files changed +24
-20
lines changed
2 files changed +24
-20
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package main
3
3
import (
4
4
"errors"
5
5
"fmt"
6
+ "log"
6
7
"net/url"
7
8
"os"
8
9
"path"
@@ -371,3 +372,25 @@ func validateContributorRelativeUrls(contributors map[string]contributorProfile)
371
372
errors : problems ,
372
373
}
373
374
}
375
+
376
+ func validateAllContributors (errChan chan <- error ) {
377
+ allReadmeFiles , err := aggregateContributorReadmeFiles ()
378
+ if err != nil {
379
+ errChan <- err
380
+ return
381
+ }
382
+ log .Printf ("Processing %d README files\n " , len (allReadmeFiles ))
383
+ contributors , err := parseContributorFiles (allReadmeFiles )
384
+ log .Printf ("Processed %d README files as valid contributor profiles" , len (contributors ))
385
+ if err != nil {
386
+ errChan <- err
387
+ return
388
+ }
389
+ err = validateContributorRelativeUrls (contributors )
390
+ if err != nil {
391
+ errChan <- err
392
+ return
393
+ }
394
+ log .Println ("All relative URLs for READMEs are valid" )
395
+ log .Printf ("Processed all READMEs in the %q directory\n " , rootRegistryPath )
396
+ }
Original file line number Diff line number Diff line change @@ -87,26 +87,7 @@ func main() {
87
87
wg .Add (1 )
88
88
go func () {
89
89
defer wg .Done ()
90
-
91
- allReadmeFiles , err := aggregateContributorReadmeFiles ()
92
- if err != nil {
93
- errChan <- err
94
- return
95
- }
96
- log .Printf ("Processing %d README files\n " , len (allReadmeFiles ))
97
- contributors , err := parseContributorFiles (allReadmeFiles )
98
- log .Printf ("Processed %d README files as valid contributor profiles" , len (contributors ))
99
- if err != nil {
100
- errChan <- err
101
- return
102
- }
103
- err = validateContributorRelativeUrls (contributors )
104
- if err != nil {
105
- errChan <- err
106
- return
107
- }
108
- log .Println ("All relative URLs for READMEs are valid" )
109
- log .Printf ("Processed all READMEs in the %q directory\n " , rootRegistryPath )
90
+ validateAllContributors (errChan )
110
91
}()
111
92
112
93
// Validate modules
You can’t perform that action at this time.
0 commit comments