Skip to content

Commit

Permalink
fix static analysis checks
Browse files Browse the repository at this point in the history
Signed-off-by: Benji Visser <[email protected]>
  • Loading branch information
noqcks committed Sep 19, 2023
1 parent 34a241b commit df35c13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions cmd/xeol/cli/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ You can also pipe in Syft JSON directly:
}, opts)
}

//nolint:funlen
//nolint:funlen,gocognit
func runXeol(app clio.Application, opts *options.Xeol, userInput string) error {
errs := make(chan error)
go func() {
Expand Down Expand Up @@ -187,8 +187,7 @@ func runXeol(app clio.Application, opts *options.Xeol, userInput string) error {
var failScan bool
var imageVerified bool
var sourceIsImageType bool
switch s.Source.Metadata.(type) {
case source.StereoscopeImageSourceMetadata:
if _, ok := s.Source.Metadata.(source.StereoscopeImageSourceMetadata); ok {
sourceIsImageType = true
}

Expand Down
5 changes: 2 additions & 3 deletions cmd/xeol/internal/ui/post_ui_event_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/xeol-io/xeol/xeol/event"
"github.com/xeol-io/xeol/xeol/event/parsers"

xeolEventParsers "github.com/xeol-io/xeol/xeol/event/parsers"
policyTypes "github.com/xeol-io/xeol/xeol/policy/types"
)

Expand Down Expand Up @@ -136,7 +135,7 @@ func writeNotifications(writer io.Writer, events ...partybus.Event) error {
func writeNotaryPolicyEvaluationMessage(writer io.Writer, events ...partybus.Event) error {
for _, e := range events {
// show the report to stdout
nt, err := xeolEventParsers.ParseNotaryPolicyEvaluationMessage(e)
nt, err := parsers.ParseNotaryPolicyEvaluationMessage(e)
if err != nil {
return fmt.Errorf("bad %s event: %w", e.Type, err)
}
Expand Down Expand Up @@ -165,7 +164,7 @@ func writeNotaryPolicyEvaluationMessage(writer io.Writer, events ...partybus.Eve
func writeEolPolicyEvaluationMessage(writer io.Writer, events ...partybus.Event) error {
for _, e := range events {
// show the report to stdout
pt, err := xeolEventParsers.ParseEolPolicyEvaluationMessage(e)
pt, err := parsers.ParseEolPolicyEvaluationMessage(e)
if err != nil {
return fmt.Errorf("bad %s event: %w", e.Type, err)
}
Expand Down

0 comments on commit df35c13

Please sign in to comment.