mirror of
https://github.com/ossf/scorecard.git
synced 2024-10-26 10:28:10 +03:00
Show result as pass/fail instead of true/false to match docs.
This commit is contained in:
parent
eb55aca83d
commit
ca862c3181
22
README.md
22
README.md
@ -31,24 +31,24 @@ Finished [CII-Best-Practices]
|
||||
Finished [Frozen-Deps]
|
||||
Finished [Security-Policy]
|
||||
Finished [Contributors]
|
||||
Finished [Signed-Tags]
|
||||
Finished [Signed-Releases]
|
||||
Finished [Signed-Tags]
|
||||
Finished [CI-Tests]
|
||||
Finished [Code-Review]
|
||||
Finished [Pull-Requests]
|
||||
|
||||
RESULTS
|
||||
-------
|
||||
CI-Tests true 10
|
||||
CII-Best-Practices true 10
|
||||
Code-Review true 10
|
||||
Contributors true 10
|
||||
Frozen-Deps true 10
|
||||
Fuzzing true 10
|
||||
Pull-Requests true 9
|
||||
Security-Policy true 10
|
||||
Signed-Releases false 10
|
||||
Signed-Tags false 5
|
||||
CI-Tests pass 10
|
||||
CII-Best-Practices pass 10
|
||||
Code-Review pass 10
|
||||
Contributors pass 10
|
||||
Frozen-Deps pass 10
|
||||
Fuzzing pass 10
|
||||
Pull-Requests pass 9
|
||||
Security-Policy pass 10
|
||||
Signed-Releases fail 10
|
||||
Signed-Tags fail 5
|
||||
```
|
||||
|
||||
It is recommended to use an OAuth token to avoid rate limits.
|
||||
|
10
main.go
10
main.go
@ -39,6 +39,14 @@ func stringInListOrEmpty(s string, list []string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func displayResult(result bool) string {
|
||||
if result {
|
||||
return "pass"
|
||||
} else {
|
||||
return "fail"
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
cfg := zap.NewProductionConfig()
|
||||
@ -121,6 +129,6 @@ func main() {
|
||||
fmt.Println("RESULTS")
|
||||
fmt.Println("-------")
|
||||
for _, r := range results {
|
||||
fmt.Println(r.name, r.cr.Pass, r.cr.Confidence)
|
||||
fmt.Println(r.name, displayResult(r.cr.Pass), r.cr.Confidence)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user