mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 04:26:39 +00:00
fix staticcheck issues
add staticcheck CI action add staticcheck in Makefile Signed-off-by: roywang <seiwy2010@gmail.com>
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha2"
|
||||
corev1alpha2 "github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha2"
|
||||
"github.com/oam-dev/kubevela/apis/types"
|
||||
util2 "github.com/oam-dev/kubevela/pkg/commands/util"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"github.com/oam-dev/kubevela/pkg/utils/system"
|
||||
)
|
||||
|
||||
// nolint
|
||||
// DescriptionUndefined indicates the description is not defined
|
||||
const DescriptionUndefined = "description not defined"
|
||||
|
||||
// GetCapabilitiesFromCluster will get capability from K8s cluster
|
||||
@@ -108,7 +107,7 @@ func GetTraitsFromCluster(ctx context.Context, namespace string, c types.Args, s
|
||||
}
|
||||
|
||||
// validateCapabilities validates whether helm charts are successful installed, GVK are successfully retrieved.
|
||||
func validateCapabilities(tmp types.Capability, dm discoverymapper.DiscoveryMapper, definitionName string, reference v1alpha2.DefinitionReference) (types.Capability, error) {
|
||||
func validateCapabilities(tmp types.Capability, dm discoverymapper.DiscoveryMapper, definitionName string, reference corev1alpha2.DefinitionReference) (types.Capability, error) {
|
||||
var err error
|
||||
if tmp.Install != nil {
|
||||
tmp.Source = &types.Source{ChartName: tmp.Install.Helm.Name}
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestAPIs(t *testing.T) {
|
||||
}
|
||||
|
||||
var _ = BeforeSuite(func(done Done) {
|
||||
logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
|
||||
logf.SetLogger(zap.New(zap.UseDevMode(true), zap.WriteTo(GinkgoWriter)))
|
||||
ctx := context.Background()
|
||||
By("bootstrapping test environment")
|
||||
useExistCluster := false
|
||||
|
||||
Reference in New Issue
Block a user