Skip to content

Commit

Permalink
lint-fix
Browse files Browse the repository at this point in the history
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
  • Loading branch information
westonsteimel committed Oct 6, 2022
1 parent b1ccfa2 commit 072ed00
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ require (
github.com/anchore/sqlite v1.4.6-0.20220607210448-bcc6ee5c4963
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b
github.com/in-toto/in-toto-golang v0.3.4-0.20220709202702-fa494aaa0add
github.com/mitchellh/mapstructure v1.5.0
github.com/secure-systems-lab/go-securesystemslib v0.4.0
github.com/sigstore/cosign v1.12.1
github.com/sigstore/sigstore v1.4.1
Expand Down Expand Up @@ -185,7 +186,6 @@ require (
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand Down
4 changes: 3 additions & 1 deletion grype/db/v4/pkg/qualifier/from_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package qualifier

import (
"encoding/json"

"github.com/mitchellh/mapstructure"

"github.com/anchore/grype/grype/db/v4/pkg/qualifier/rpmmodularity"
"github.com/anchore/grype/internal/log"
"github.com/mitchellh/mapstructure"
)

func FromJSON(data []byte) ([]Qualifier, error) {
Expand Down
1 change: 1 addition & 0 deletions grype/db/v4/pkg/qualifier/qualifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package qualifier

import (
"fmt"

"github.com/anchore/grype/grype/pkg/qualifier"
)

Expand Down
1 change: 1 addition & 0 deletions grype/db/v4/pkg/qualifier/rpmmodularity/qualifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package rpmmodularity

import (
"fmt"

"github.com/anchore/grype/grype/pkg/qualifier"
"github.com/anchore/grype/grype/pkg/qualifier/rpmmodularity"
)
Expand Down
2 changes: 1 addition & 1 deletion grype/db/v4/store/model/vulnerability.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package model
import (
"encoding/json"
"fmt"
"github.com/anchore/grype/grype/db/v4/pkg/qualifier"

sqlite "github.com/anchore/grype/grype/db/internal/sqlite"
v4 "github.com/anchore/grype/grype/db/v4"
"github.com/anchore/grype/grype/db/v4/pkg/qualifier"
)

const (
Expand Down
6 changes: 4 additions & 2 deletions grype/db/v4/store/model/vulnerability_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package model

import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/anchore/grype/grype/db/internal/sqlite"
v4 "github.com/anchore/grype/grype/db/v4"
"github.com/anchore/grype/grype/db/v4/pkg/qualifier"
"github.com/anchore/grype/grype/db/v4/pkg/qualifier/rpmmodularity"
"github.com/stretchr/testify/assert"
"testing"
)

func TestVulnerabilityModel_Inflate(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion grype/db/v4/vulnerability.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package v4

import (
"github.com/anchore/grype/grype/db/v4/pkg/qualifier"
"sort"
"strings"

"github.com/anchore/grype/grype/db/v4/pkg/qualifier"
)

// Vulnerability represents the minimum data fields necessary to perform package-to-vulnerability matching. This can represent a CVE, 3rd party advisory, or any source that relates back to a CVE.
Expand Down
2 changes: 1 addition & 1 deletion grype/db/vulnerability_provider_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package db

import (
"github.com/anchore/grype/grype/pkg/qualifier"
"testing"

"github.com/go-test/deep"
Expand All @@ -11,6 +10,7 @@ import (

"github.com/anchore/grype/grype/distro"
"github.com/anchore/grype/grype/pkg"
"github.com/anchore/grype/grype/pkg/qualifier"
"github.com/anchore/grype/grype/version"
"github.com/anchore/grype/grype/vulnerability"
syftPkg "github.com/anchore/syft/syft/pkg"
Expand Down
4 changes: 2 additions & 2 deletions grype/matcher/rpm/matcher_mocks_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package rpm

import (
"github.com/anchore/grype/grype/pkg/qualifier"
"github.com/anchore/grype/grype/pkg/qualifier/rpmmodularity"
"strings"

"github.com/anchore/grype/grype/distro"
"github.com/anchore/grype/grype/pkg"
"github.com/anchore/grype/grype/pkg/qualifier"
"github.com/anchore/grype/grype/pkg/qualifier/rpmmodularity"
"github.com/anchore/grype/grype/version"
"github.com/anchore/grype/grype/vulnerability"
syftPkg "github.com/anchore/syft/syft/pkg"
Expand Down
3 changes: 2 additions & 1 deletion grype/pkg/qualifier/rpmmodularity/qualifier.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package rpmmodularity

import (
"strings"

"github.com/anchore/grype/grype/pkg"
"github.com/anchore/grype/grype/pkg/qualifier"
"strings"
)

type rpmModularity struct {
Expand Down
6 changes: 4 additions & 2 deletions grype/pkg/qualifier/rpmmodularity/qualifier_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package rpmmodularity

import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/anchore/grype/grype/pkg"
"github.com/anchore/grype/grype/pkg/qualifier"
"github.com/stretchr/testify/assert"
"testing"
)

func TestRpmModularity_Satisfied(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion grype/search/only_qualified_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package search

import (
"fmt"
"github.com/anchore/grype/grype/pkg"

"github.com/anchore/grype/grype/pkg"
"github.com/anchore/grype/grype/vulnerability"
)

Expand Down
2 changes: 1 addition & 1 deletion grype/vulnerability/vulnerability.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package vulnerability

import (
"fmt"
"github.com/anchore/grype/grype/pkg/qualifier"

grypeDB "github.com/anchore/grype/grype/db/v4"
"github.com/anchore/grype/grype/pkg/qualifier"
"github.com/anchore/grype/grype/version"
"github.com/anchore/syft/syft/pkg"
)
Expand Down

0 comments on commit 072ed00

Please sign in to comment.