-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add go report, coverage fix coverage link Update README.md Update README.md Update README.md fix badge colors Update README.md Update README.md add coverage to circleci better coverage calculation fix circleci
- Loading branch information
Showing
8 changed files
with
554 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /bin/bash | ||
|
||
go tool cover -func=./test/cover.out > ./test/coverage-report.txt | ||
|
||
total=0 | ||
count=0 | ||
|
||
while read l; do | ||
fields=($l) | ||
fn_coverage=${fields[2]::-3} | ||
total=$((total + fn_coverage)) | ||
count=$((count + 1)) | ||
done <./test/coverage-report.txt | ||
|
||
coverage=$(( total / count )) | ||
echo $coverage | ||
color="239922" | ||
if [[ $coverage -lt 50 ]] ; then | ||
color="C21807" | ||
elif [[ $coverage -lt 70 ]] ; then | ||
color="FFD300" | ||
fi | ||
sed -i -- "s/^\[coverage-image\].*$/\[coverage-image\]: https:\/\/img.shields.io\/static\/v1.svg?label=Coverage\&message=$coverage%25\&color=$color/" README.md |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
github.com/reactiveops/polaris/pkg/config/config.go:112: ParseFile 0.0% | ||
github.com/reactiveops/polaris/pkg/config/config.go:121: Parse 100.0% | ||
github.com/reactiveops/polaris/pkg/config/severity.go:32: IsActionable 0.0% | ||
github.com/reactiveops/polaris/pkg/kube/resources.go:35: CreateResourceProvider 0.0% | ||
github.com/reactiveops/polaris/pkg/kube/resources.go:43: CreateResourceProviderFromPath 82.2% | ||
github.com/reactiveops/polaris/pkg/kube/resources.go:114: CreateResourceProviderFromCluster 0.0% | ||
github.com/reactiveops/polaris/pkg/kube/resources.go:124: CreateResourceProviderFromAPI 0.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:34: ValidateContainer 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:55: validateResources 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:84: validateResourceRange 85.7% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:104: validateHealthChecks 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:123: validateImage 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:143: validateNetworking 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:162: validateSecurity 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:217: validateCapabilities 86.7% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:261: commaSeparatedCapabilities 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:269: capIntersection 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:286: capDifference 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/container.go:303: capContains 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/deployment.go:24: ValidateDeployment 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/deployment.go:36: ValidateDeployments 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/deployment.go:47: addResult 87.5% | ||
github.com/reactiveops/polaris/pkg/validator/fullaudit.go:31: RunAudit 88.9% | ||
github.com/reactiveops/polaris/pkg/validator/pod.go:30: ValidatePod 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/pod.go:55: validateContainers 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/pod.go:62: validateSecurity 77.8% | ||
github.com/reactiveops/polaris/pkg/validator/pod.go:82: validateNetworking 80.0% | ||
github.com/reactiveops/polaris/pkg/validator/resource.go:29: messages 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/resource.go:37: summary 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/resource.go:62: addMessage 0.0% | ||
github.com/reactiveops/polaris/pkg/validator/resource.go:74: addFailure 80.0% | ||
github.com/reactiveops/polaris/pkg/validator/resource.go:84: addError 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/resource.go:92: addWarning 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/resource.go:100: addSuccess 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/types.go:48: appendCounts 100.0% | ||
github.com/reactiveops/polaris/pkg/validator/types.go:63: appendResults 100.0% | ||
total: (statements) 81.2% |
234 changes: 234 additions & 0 deletions
234
vendor/github.com/googleapis/gnostic/test/library-example-with-ext.text.out
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
vendor/github.com/googleapis/gnostic/test/v2.0/yaml/sample-petstore.out
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.