Skip to content

Commit

Permalink
Ignore gosec errors for unhandled Errors warning
Browse files Browse the repository at this point in the history
This is because we're choosing to ignore the error returned by
bytes.Buffer.WriteString which will never be returned.

See 4d209a3 for more info.
  • Loading branch information
Zachary Scott committed Dec 25, 2018
1 parent 4d209a3 commit 02b2b93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func parameterDefaultToString(parameter api.OrbElementParameter) string {
return defaultValue + "')"
}

// nolint: errcheck
// nolint: errcheck, gosec
func addOrbElementParametersToBuffer(buf *bytes.Buffer, orbElement api.OrbElement) {
keys := make([]string, 0, len(orbElement.Parameters))
for k := range orbElement.Parameters {
Expand All @@ -269,7 +269,7 @@ func addOrbElementParametersToBuffer(buf *bytes.Buffer, orbElement api.OrbElemen
}
}

// nolint: errcheck
// nolint: errcheck, gosec
func addOrbElementsToBuffer(buf *bytes.Buffer, name string, namedOrbElements map[string]api.OrbElement) {
if len(namedOrbElements) > 0 {
keys := make([]string, 0, len(namedOrbElements))
Expand All @@ -294,7 +294,7 @@ func addOrbElementsToBuffer(buf *bytes.Buffer, name string, namedOrbElements map
}
}

// nolint: unparam, errcheck
// nolint: unparam, errcheck, gosec
func addOrbStatisticsToBuffer(buf *bytes.Buffer, name string, stats api.OrbStatistics) {
var (
encoded []byte
Expand Down

0 comments on commit 02b2b93

Please sign in to comment.