File tree Expand file tree Collapse file tree 2 files changed +39
-35
lines changed Expand file tree Collapse file tree 2 files changed +39
-35
lines changed Original file line number Diff line number Diff line change 1
- // This package is for validating all contributors within the main Registry
2
- // directory. It validates that it has nothing but sub-directories, and that
3
- // each sub-directory has a README.md file. Each of those files must then
4
- // describe a specific contributor. The contents of these files will be parsed
5
- // by the Registry site build step, to be displayed in the Registry site's UI.
6
1
package main
7
2
8
3
import (
9
4
"bufio"
10
5
"errors"
11
6
"fmt"
12
- "log"
13
7
"net/url"
14
8
"os"
15
9
"path"
@@ -449,32 +443,3 @@ func validateRelativeUrls(
449
443
errors : problems ,
450
444
}
451
445
}
452
-
453
- func main () {
454
- log .Println ("Starting README validation" )
455
- allReadmeFiles , err := aggregateContributorReadmeFiles ()
456
- if err != nil {
457
- log .Panic (err )
458
- }
459
-
460
- log .Printf ("Processing %d README files\n " , len (allReadmeFiles ))
461
- contributors , err := parseContributorFiles (allReadmeFiles )
462
- if err != nil {
463
- log .Panic (err )
464
- }
465
- log .Printf (
466
- "Processed %d README files as valid contributor profiles" ,
467
- len (contributors ),
468
- )
469
-
470
- err = validateRelativeUrls (contributors )
471
- if err != nil {
472
- log .Panic (err )
473
- }
474
- log .Println ("All relative URLs for READMEs are valid" )
475
-
476
- log .Printf (
477
- "Processed all READMEs in the %q directory\n " ,
478
- rootRegistryPath ,
479
- )
480
- }
Original file line number Diff line number Diff line change
1
+ // This package is for validating all contributors within the main Registry
2
+ // directory. It validates that it has nothing but sub-directories, and that
3
+ // each sub-directory has a README.md file. Each of those files must then
4
+ // describe a specific contributor. The contents of these files will be parsed
5
+ // by the Registry site build step, to be displayed in the Registry site's UI.
6
+ package main
7
+
8
+ import (
9
+ "log"
10
+ )
11
+
12
+ func main () {
13
+ log .Println ("Starting README validation" )
14
+ allReadmeFiles , err := aggregateContributorReadmeFiles ()
15
+ if err != nil {
16
+ log .Panic (err )
17
+ }
18
+
19
+ log .Printf ("Processing %d README files\n " , len (allReadmeFiles ))
20
+ contributors , err := parseContributorFiles (allReadmeFiles )
21
+ log .Printf (
22
+ "Processed %d README files as valid contributor profiles" ,
23
+ len (contributors ),
24
+ )
25
+ if err != nil {
26
+ log .Panic (err )
27
+ }
28
+
29
+ err = validateRelativeUrls (contributors )
30
+ if err != nil {
31
+ log .Panic (err )
32
+ }
33
+ log .Println ("All relative URLs for READMEs are valid" )
34
+
35
+ log .Printf (
36
+ "Processed all READMEs in the %q directory\n " ,
37
+ rootRegistryPath ,
38
+ )
39
+ }
You can’t perform that action at this time.
0 commit comments