Uploaded image for project: 'Red Hat OpenShift Control Planes'
  1. Red Hat OpenShift Control Planes
  2. CNTRLPLANE-635

Enable nilness and unusedparam checks in verify target

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None
    • None
    • None

      We already run go vet but there are additional static analyzers out there that can offer value.

      gopls added nilness and unusedparam and recently
      https://github.com/golang/tools/releases/tag/gopls%2Fv0.15.0

      problems nilness found
      https://github.com/openshift/hypershift/pull/3698

      problems nilenss would have prevented
      https://github.com/openshift/hypershift/pull/3661

      Go might enable this in go vet in the future
      https://github.com/golang/go/issues/59714

      Example invocation

      go install golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness@latest
      go vet -vettool $(which nilness) ./...
      

              hypershift-automation hypershift-team automation
              sjenning Seth Jennings
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: