sigstore / cosign-gatekeeper-provider

🔮 ✈️ to integrate OPA Gatekeeper's new ExternalData feature with cosign to determine whether the images are valid by verifying their signatures
Apache License 2.0
76 stars 23 forks source link

Fix `golangci-lint` issues and warnings #23

Closed mathieu-benoit closed 1 year ago

mathieu-benoit commented 1 year ago

Signed-off-by: Mathieu Benoit mathieu-benoit@hotmail.fr

Fixing: https://github.com/sigstore/cosign-gatekeeper-provider/issues/22.

FYI, resources in this Org related to this (specifically around the value: 10 * time.Second):

Also took the initiative to fix the following warnings by removing the deprecated linters now included in the unused linter:

level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused."
  level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner.  Replaced by revive."
  level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused."
  level=warning msg="[runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. "
  level=warning msg="[runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused."

Finally, took also the initiative to fix the following warning by using golangci/golangci-lint-action v3:

Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/