Skip to content

Commit

Permalink
chore: update code static analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Phillips <[email protected]>
  • Loading branch information
spiffcs committed Dec 20, 2023
1 parent b89d0c4 commit ea14035
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion cmd/grant/cli/internal/check/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func (r *Report) Render() error {
return r.renderCheckTree()
case JSON:
return r.renderJSON()
return errors.New("json format not yet supported")
}
return errors.Join(r.errors...)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/grant/cli/tui/handle_task_started.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func (m *Handler) handleTaskStarted(e partybus.Event) ([]tea.Model, tea.Cmd) {
cmd, prog, err := event.ParseTaskStarted(e)
if err != nil {
//log.Warnf("unable to parse event: %+v", err)
// log.Warnf("unable to parse event: %+v", err)
return nil, nil
}

Expand Down
3 changes: 2 additions & 1 deletion grant/case.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ type Case struct {
func NewCases(p Policy, userInputs ...string) []Case {
cases := make([]Case, 0)
ch, err := NewCaseHandler()
defer ch.Close()
if err != nil {
log.Errorf("unable to create case handler: %+v", err)
return cases
}
defer ch.Close()
for _, userInput := range userInputs {
c, err := ch.determineRequestCase(userInput)
if err != nil {
Expand Down Expand Up @@ -161,6 +161,7 @@ func (ch *CaseHandler) handleFile(path string) (c Case, err error) {

sb, _, _, err := format.NewDecoderCollection(format.Decoders()...).Decode(bytes)
if err != nil {
log.Debugf("unable to determine SBOM or licenses for %s: %+v", path, err)
// we want to log the error, but we don't want to return yet
}
if sb != nil {
Expand Down

0 comments on commit ea14035

Please sign in to comment.