Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
add update and verify makefile
Browse files Browse the repository at this point in the history
Signed-off-by: calvin0327 <[email protected]>
  • Loading branch information
calvin0327 committed Dec 9, 2022
1 parent c1b9e23 commit 3103aac
Show file tree
Hide file tree
Showing 2,269 changed files with 995,224 additions and 21 deletions.
67 changes: 67 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This files contains all configuration options for analysis running.
# More details please refer to: https://golangci-lint.run/usage/configuration/

run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 50m

# which dirs to skip: issues from them won't be reported;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but default dirs are skipped independently
# from this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work
# on Windows.
skip-dirs:
- hack/tools/preferredimports # This code is directly lifted from the Kubernetes codebase, skip checking
- (^|/)vendor($|/)
- (^|/)third_party($|/)
- (^|/)generated($|/)

skip-files:
- "^zz_generated.*"

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: false

# One of 'readonly' and 'vendor'.
# - readonly: the go command is disallowed from the implicit automatic updating of go.mod described above.
# Instead, it fails when any changes to go.mod are needed. This setting is most useful to check
# that go.mod does not need updates, such as in a continuous integration and testing system.
# - vendor: the go command assumes that the vendor directory holds the correct copies of dependencies and ignores
# the dependency descriptions in go.mod.
modules-download-mode: readonly

linters:
disable-all: true
enable:
# linters maintained by golang.org
- gofmt
- goimports
# linters default enabled by golangci-lint .
- errcheck
- gosimple
- ineffassign
- staticcheck
- typecheck
- unused
- govet
# other linters supported by golangci-lint.
- gci
- gocyclo
- gosec
- misspell
- whitespace
- revive

linters-settings:
goimports:
local-prefixes: github.com/karmada-io/karmada-operator
gocyclo:
# minimal cyclomatic complexity to report
min-complexity: 15
gci:
sections:
- Standard
- Default
- Prefix(github.com/karmada-io/karmada-operator)
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: update
update:
hack/update-all.sh

.PHONY: verify
verify:
hack/verify-all.sh
4 changes: 2 additions & 2 deletions config/crds/operator.karmada.io_karmadas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ spec:
type: object
type: object
serviceType:
description: ServiceType represents the sevice type of karmada
description: ServiceType represents the service type of karmada
apiserver. it is Nodeport by default.
type: string
type: object
Expand Down Expand Up @@ -1288,7 +1288,7 @@ spec:
type: object
type: array
karmadaVersion:
description: KarmadaVersion represente the karmada verison.
description: KarmadaVersion represente the karmada version.
type: string
kubernetesVersion:
description: KubernetesVersion represente the karmada-apiserver version.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/karmada-io/karmada-operator
go 1.18

require (
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
k8s.io/api v0.25.0
k8s.io/apimachinery v0.25.0
k8s.io/client-go v0.25.0
Expand Down Expand Up @@ -45,7 +46,6 @@ require (
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/tools v0.1.12 // indirect
Expand Down
44 changes: 44 additions & 0 deletions hack/.import-aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"k8s.io/api/admissionregistration/v1": "admissionregistrationv1",
"k8s.io/api/admissionregistration/v1beta1": "admissionregistrationv1beta1",
"k8s.io/api/admission/v1beta1": "admissionv1beta1",
"k8s.io/api/admission/v1": "admissionv1",
"k8s.io/api/apps/v1": "appsv1",
"k8s.io/api/apps/v1beta1": "appsv1beta1",
"k8s.io/api/apps/v1beta2": "appsv1beta2",
"k8s.io/api/authentication/v1": "authenticationv1",
"k8s.io/api/authentication/v1beta1": "authenticationv1beta1",
"k8s.io/api/authorization/v1": "authorizationv1",
"k8s.io/api/authorization/v1beta1": "authorizationv1beta1",
"k8s.io/api/autoscaling/v1": "autoscalingv1",
"k8s.io/api/autoscaling/v2": "autoscalingv2",
"k8s.io/api/batch/v1": "batchv1",
"k8s.io/api/batch/v1beta1": "batchv1beta1",
"k8s.io/api/certificates/v1beta1": "certificatesv1beta1",
"k8s.io/api/coordination/v1": "coordinationv1",
"k8s.io/api/coordination/v1beta1": "coordinationv1beta1",
"k8s.io/api/core/v1": "corev1",
"k8s.io/api/discovery/v1": "discoveryv1",
"k8s.io/api/events/v1": "eventsv1",
"k8s.io/api/events/v1beta1": "eventsv1beta1",
"k8s.io/api/extensions/v1beta1": "extensionsv1beta1",
"k8s.io/api/imagepolicy/v1alpha1": "imagepolicyv1alpha1",
"k8s.io/api/networking/v1": "networkingv1",
"k8s.io/api/networking/v1beta1": "networkingv1beta1",
"k8s.io/api/node/v1alpha1": "nodev1alpha1",
"k8s.io/api/node/v1beta1": "nodev1beta1",
"k8s.io/api/node/v1": "nodev1",
"k8s.io/api/policy/v1": "policyv1",
"k8s.io/api/policy/v1beta1": "policyv1beta1",
"k8s.io/api/rbac/v1": "rbacv1",
"k8s.io/api/rbac/v1alpha1": "rbacv1alpha1",
"k8s.io/api/rbac/v1beta1": "rbacv1beta1",
"k8s.io/api/scheduling/v1": "schedulingv1",
"k8s.io/api/scheduling/v1alpha1": "schedulingv1alpha1",
"k8s.io/api/scheduling/v1beta1": "schedulingv1beta1",
"k8s.io/api/storage/v1": "storagev1",
"k8s.io/api/storage/v1alpha1": "storagev1alpha1",
"k8s.io/api/storage/v1beta1": "storagev1beta1",
"k8s.io/apimachinery/pkg/api/errors": "apierrors",
"k8s.io/apimachinery/pkg/apis/meta/v1": "metav1"
}
Loading

0 comments on commit 3103aac

Please sign in to comment.