netdata/netdata

View on GitHub
src/go/collectors/go.d.plugin/modules/smartctl/exec.go

Summary

Maintainability
A
40 mins
Test Coverage

Method smartctlCliExec.execute has 6 return statements (exceeds 4 allowed).
Open

func (e *smartctlCliExec) execute(args ...string) (*gjson.Result, error) {
    ctx, cancel := context.WithTimeout(context.Background(), e.timeout)
    defer cancel()

    cmd := exec.CommandContext(ctx, e.ndsudoPath, args...)
Severity: Major
Found in src/go/collectors/go.d.plugin/modules/smartctl/exec.go - About 40 mins to fix

    There are no issues that match your filters.

    Category
    Status