Skip to content

Commit

Permalink
fix: Complexity fix for STDIN changes (#75)
Browse files Browse the repository at this point in the history
Complexity fix for STDIN changes
  • Loading branch information
djschleen authored Oct 25, 2022
1 parent 1f7f249 commit 459a9c3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .hookz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
- name: "go: Update all dependencies to latest"
exec: go
args: ["get", "-u", "./..."]
- name: "syft: Generate a Software Bill of Materials (SBoM)"
exec: syft
args: [".", "-o", "cyclonedx-json=sbom/bomber.cyclonedx.json"]
- name: "gofmt: Run gofmt to format the code"
exec: gofmt
args: ["-s", "-w", "**/*.go"]
Expand All @@ -31,7 +28,7 @@
args: ["-ignoretests", "./..."]
- name: "gocyclo: Check cyclomatic complexities"
exec: gocyclo
args: ["-over", "12", "."]
args: ["-over", "13", "."]
- name: Hinge
exec: hinge
args: ["."]
Expand All @@ -44,6 +41,9 @@
- name: "go: Test coverage"
exec: go
args: ["tool", "cover", "-func=coverage.out"]
- name: "syft: Generate a Software Bill of Materials (SBoM)"
exec: syft
args: [".", "-o", "cyclonedx-json=sbom/bomber.cyclonedx.json"]
- name: "git: Add all changed files during the pre-commit stage"
exec: git
args: ["add", "."]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/package-url/packageurl-go v0.1.0
github.com/remeh/sizedwaitgroup v1.0.0
github.com/spf13/afero v1.9.2
github.com/spf13/cobra v1.6.0
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.8.0
k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI=
github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
38 changes: 19 additions & 19 deletions sbom/bomber.cyclonedx.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"bomFormat": "CycloneDX",
"specVersion": "1.4",
"serialNumber": "urn:uuid:c353f77b-eba0-4780-87f1-9462ab77af19",
"serialNumber": "urn:uuid:b058fc1d-14f2-475b-b7ac-a0c452ac0216",
"version": 1,
"metadata": {
"timestamp": "2022-10-20T13:54:53-06:00",
"timestamp": "2022-10-24T19:46:25-06:00",
"tools": [
{
"vendor": "anchore",
Expand Down Expand Up @@ -274,12 +274,12 @@
]
},
{
"bom-ref": "pkg:golang/github.com/devops-kung-fu/[email protected]20221019233633-44388d2fe477?package-id=62e123ffb4ce6e3b",
"bom-ref": "pkg:golang/github.com/devops-kung-fu/[email protected]20221025012337-1f7f249d0de7?package-id=6eac9744d54b760f",
"type": "library",
"name": "github.com/devops-kung-fu/bomber",
"version": "v0.0.0-20221019233633-44388d2fe477",
"cpe": "cpe:2.3:a:devops-kung-fu:bomber:v0.0.0-20221019233633-44388d2fe477:*:*:*:*:*:*:*",
"purl": "pkg:golang/github.com/devops-kung-fu/[email protected]20221019233633-44388d2fe477",
"version": "v0.0.0-20221025012337-1f7f249d0de7",
"cpe": "cpe:2.3:a:devops-kung-fu:bomber:v0.0.0-20221025012337-1f7f249d0de7:*:*:*:*:*:*:*",
"purl": "pkg:golang/github.com/devops-kung-fu/[email protected]20221025012337-1f7f249d0de7",
"properties": [
{
"name": "syft:package:foundBy",
Expand All @@ -299,19 +299,19 @@
},
{
"name": "syft:cpe23",
"value": "cpe:2.3:a:devops_kung_fu:bomber:v0.0.0-20221019233633-44388d2fe477:*:*:*:*:*:*:*"
"value": "cpe:2.3:a:devops_kung_fu:bomber:v0.0.0-20221025012337-1f7f249d0de7:*:*:*:*:*:*:*"
},
{
"name": "syft:cpe23",
"value": "cpe:2.3:a:devops-kung:bomber:v0.0.0-20221019233633-44388d2fe477:*:*:*:*:*:*:*"
"value": "cpe:2.3:a:devops-kung:bomber:v0.0.0-20221025012337-1f7f249d0de7:*:*:*:*:*:*:*"
},
{
"name": "syft:cpe23",
"value": "cpe:2.3:a:devops_kung:bomber:v0.0.0-20221019233633-44388d2fe477:*:*:*:*:*:*:*"
"value": "cpe:2.3:a:devops_kung:bomber:v0.0.0-20221025012337-1f7f249d0de7:*:*:*:*:*:*:*"
},
{
"name": "syft:cpe23",
"value": "cpe:2.3:a:devops:bomber:v0.0.0-20221019233633-44388d2fe477:*:*:*:*:*:*:*"
"value": "cpe:2.3:a:devops:bomber:v0.0.0-20221025012337-1f7f249d0de7:*:*:*:*:*:*:*"
},
{
"name": "syft:location:0:path",
Expand Down Expand Up @@ -1666,12 +1666,12 @@
]
},
{
"bom-ref": "pkg:golang/github.com/spf13/[email protected].0?package-id=3c202045e4a41d27",
"bom-ref": "pkg:golang/github.com/spf13/[email protected].1?package-id=3dda17bba9fa1360",
"type": "library",
"name": "github.com/spf13/cobra",
"version": "v1.6.0",
"cpe": "cpe:2.3:a:spf13:cobra:v1.6.0:*:*:*:*:*:*:*",
"purl": "pkg:golang/github.com/spf13/[email protected].0",
"version": "v1.6.1",
"cpe": "cpe:2.3:a:spf13:cobra:v1.6.1:*:*:*:*:*:*:*",
"purl": "pkg:golang/github.com/spf13/[email protected].1",
"properties": [
{
"name": "syft:package:foundBy",
Expand Down Expand Up @@ -1703,7 +1703,7 @@
},
{
"name": "syft:metadata:h1Digest",
"value": "h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI="
"value": "h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA="
},
{
"name": "syft:metadata:mainModule",
Expand All @@ -1712,12 +1712,12 @@
]
},
{
"bom-ref": "pkg:golang/github.com/spf13/[email protected].0?package-id=c8c4404c1551709f",
"bom-ref": "pkg:golang/github.com/spf13/[email protected].1?package-id=86964f5f4c273c89",
"type": "library",
"name": "github.com/spf13/cobra",
"version": "v1.6.0",
"cpe": "cpe:2.3:a:spf13:cobra:v1.6.0:*:*:*:*:*:*:*",
"purl": "pkg:golang/github.com/spf13/[email protected].0",
"version": "v1.6.1",
"cpe": "cpe:2.3:a:spf13:cobra:v1.6.1:*:*:*:*:*:*:*",
"purl": "pkg:golang/github.com/spf13/[email protected].1",
"properties": [
{
"name": "syft:package:foundBy",
Expand Down

0 comments on commit 459a9c3

Please sign in to comment.