mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 10:28:36 +00:00
fix: goimports check not working in ci job (#4387)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
parent
144985ee5a
commit
91373e1329
5 changed files with 6 additions and 5 deletions
1
.github/workflows/tests.yaml
vendored
1
.github/workflows/tests.yaml
vendored
|
@ -47,6 +47,7 @@ jobs:
|
|||
|
||||
- name: goimports
|
||||
run: |
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
if [ "$(goimports -l . | wc -l)" -ne 0 ]
|
||||
then
|
||||
echo "The following files were found to have import formatting issues:"
|
||||
|
|
4
Makefile
4
Makefile
|
@ -400,8 +400,8 @@ CONTROLLER_GEN=$(shell which controller-gen)
|
|||
endif
|
||||
|
||||
.PHONY: deepcopy-autogen
|
||||
deepcopy-autogen: controller-gen ## Generate deep copy code
|
||||
$(CONTROLLER_GEN) object:headerFile="scripts/boilerplate.go.txt" paths="./..."
|
||||
deepcopy-autogen: controller-gen goimports ## Generate deep copy code
|
||||
$(CONTROLLER_GEN) object:headerFile="scripts/boilerplate.go.txt" paths="./..." && $(GO_IMPORTS) -w ./api/
|
||||
|
||||
.PHONY: codegen
|
||||
codegen: kyverno-crd report-crd deepcopy-autogen generate-api-docs gen-helm ## Update all generated code and docs
|
||||
|
|
|
@ -21,7 +21,7 @@ package v1alpha2
|
|||
|
||||
import (
|
||||
policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2"
|
||||
"k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
"github.com/kyverno/kyverno/api/kyverno/v1"
|
||||
v1 "github.com/kyverno/kyverno/api/kyverno/v1"
|
||||
admissionv1 "k8s.io/api/admission/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ limitations under the License.
|
|||
package v1alpha2
|
||||
|
||||
import (
|
||||
"k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue