Closed dmitris closed 2 weeks ago
PR fixes the semgrep issue with the dgryski ruleset, rule https://github.com/dgryski/semgrep-go/blob/master/returnnil.yml by restructuring the error handling: return nil if the err from jsonConfigMergeClone.Unmarshal, otherwise make the return value as now.
nil
err
jsonConfigMergeClone.Unmarshal
┌────────────────┐ │ 1 Code Finding │ └────────────────┘ util/jsonutil/merge.go ❯❯❱ Users.dsavints.gh.dgryski.semgrep-go.return-nil return nil instead of nil value 34┆ if err != nil { 35┆ return &errortypes.FailedToUnmarshal{ 36┆ Message: tryExtractErrorMessage(err), 37┆ } 38┆ } 39┆ return err
thanks again for all the reviews and approvals 😄 - please let me know if you would like me to rebase on trunk before merging.
PR fixes the semgrep issue with the dgryski ruleset, rule https://github.com/dgryski/semgrep-go/blob/master/returnnil.yml by restructuring the error handling: return
nil
if theerr
fromjsonConfigMergeClone.Unmarshal
, otherwise make the return value as now.