mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-11 08:55:27 +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 [Frozen-Deps]
|
||||||
Finished [Security-Policy]
|
Finished [Security-Policy]
|
||||||
Finished [Contributors]
|
Finished [Contributors]
|
||||||
Finished [Signed-Tags]
|
|
||||||
Finished [Signed-Releases]
|
Finished [Signed-Releases]
|
||||||
|
Finished [Signed-Tags]
|
||||||
Finished [CI-Tests]
|
Finished [CI-Tests]
|
||||||
Finished [Code-Review]
|
Finished [Code-Review]
|
||||||
Finished [Pull-Requests]
|
Finished [Pull-Requests]
|
||||||
|
|
||||||
RESULTS
|
RESULTS
|
||||||
-------
|
-------
|
||||||
CI-Tests true 10
|
CI-Tests pass 10
|
||||||
CII-Best-Practices true 10
|
CII-Best-Practices pass 10
|
||||||
Code-Review true 10
|
Code-Review pass 10
|
||||||
Contributors true 10
|
Contributors pass 10
|
||||||
Frozen-Deps true 10
|
Frozen-Deps pass 10
|
||||||
Fuzzing true 10
|
Fuzzing pass 10
|
||||||
Pull-Requests true 9
|
Pull-Requests pass 9
|
||||||
Security-Policy true 10
|
Security-Policy pass 10
|
||||||
Signed-Releases false 10
|
Signed-Releases fail 10
|
||||||
Signed-Tags false 5
|
Signed-Tags fail 5
|
||||||
```
|
```
|
||||||
|
|
||||||
It is recommended to use an OAuth token to avoid rate limits.
|
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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func displayResult(result bool) string {
|
||||||
|
if result {
|
||||||
|
return "pass"
|
||||||
|
} else {
|
||||||
|
return "fail"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
cfg := zap.NewProductionConfig()
|
cfg := zap.NewProductionConfig()
|
||||||
@ -121,6 +129,6 @@ func main() {
|
|||||||
fmt.Println("RESULTS")
|
fmt.Println("RESULTS")
|
||||||
fmt.Println("-------")
|
fmt.Println("-------")
|
||||||
for _, r := range results {
|
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