Skip to content

Commit

Permalink
Merge pull request #156 from alexander-demichev/v1.1.2rebase
Browse files Browse the repository at this point in the history
Rebase to v1.1.2
  • Loading branch information
openshift-merge-robot authored Mar 3, 2022
2 parents 78fff55 + 8791881 commit f9c215c
Show file tree
Hide file tree
Showing 8,311 changed files with 2,029,844 additions and 52,013 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: golang-1.16
tag: golang-1.17
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ clusterctl-settings.json
# test results
_artifacts

#release artifacts
# release artifacts
out
_releasenotes

# Helm
.helm
126 changes: 121 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ linters:
- dogsled
- errcheck
- exportloopref
- gci
- goconst
- gocritic
- gocyclo
Expand All @@ -26,6 +27,7 @@ linters:
- nilerr
- nolintlint
- prealloc
- predeclared
- revive
- rowserrcheck
- staticcheck
Expand All @@ -39,9 +41,19 @@ linters:
- whitespace

linters-settings:
godot:
# declarations - for top level declaration comments (default);
# toplevel - for top level comments;
# all - for all comments.
scope: toplevel
exclude:
- '^ \+.*'
- '^ ANCHOR.*'
ifshort:
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
max-decl-chars: 50
gci:
local-prefixes: "sigs.k8s.io/cluster-api"
importas:
no-unaliased: true
alias:
Expand All @@ -59,18 +71,84 @@ linters-settings:
# Controller Runtime
- pkg: sigs.k8s.io/controller-runtime
alias: ctrl
# CABPK
- pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3
alias: bootstrapv1alpha3
- pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4
alias: bootstrapv1alpha4
- pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1
alias: bootstrapv1
# KCP
- pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3
alias: controlplanev1alpha3
- pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4
alias: controlplanev1alpha4
- pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1
alias: controlplanev1
# CAPI
- pkg: sigs.k8s.io/cluster-api/api/v1alpha3
alias: clusterv1alpha3
- pkg: sigs.k8s.io/cluster-api/api/v1alpha4
alias: clusterv1alpha4
- pkg: sigs.k8s.io/cluster-api/api/v1beta1
alias: clusterv1
# CAPI exp
- pkg: sigs.k8s.io/cluster-api/exp/api/v1alpha3
alias: expv1alpha3
- pkg: sigs.k8s.io/cluster-api/exp/api/v1alpha4
alias: expv1alpha4
- pkg: sigs.k8s.io/cluster-api/exp/api/v1beta1
alias: expv1
# CAPI exp addons
- pkg: sigs.k8s.io/cluster-api/exp/addons/api/v1alpha3
alias: addonsv1alpha3
- pkg: sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4
alias: addonsv1alpha4
- pkg: sigs.k8s.io/cluster-api/exp/addons/api/v1beta1
alias: addonsv1
# CAPD
- pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3
alias: infrav1alpha3
- pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4
alias: infrav1alpha4
- pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1
alias: infrav1
# CAPD exp
- pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha3
alias: infraexpv1alpha3
- pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4
alias: infraexpv1alpha4
- pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1
alias: infraexpv1
nolintlint:
allow-unused: false
allow-leading-space: false
require-specific: true
staticcheck:
go: "1.16"
go: "1.17"
stylecheck:
go: "1.16"
go: "1.17"
gosec:
excludes:
- G307 # Deferring unsafe method "Close" on type "\*os.File"
- G108 # Profiling endpoint is automatically exposed on /debug/pprof
gocritic:
enabled-tags:
- experimental
disabled-checks:
- appendAssign

- dupImport # https://github.com/go-critic/go-critic/issues/845
- evalOrder
- ifElseChain
- octalLiteral
- regexpSimplify
- sloppyReassign
- truncateCmp
- typeDefFirst
- unnamedResult
- unnecessaryDefer
- whyNoLint
- wrapperFunc
issues:
max-same-issues: 0
max-issues-per-linter: 0
Expand Down Expand Up @@ -100,7 +178,7 @@ issues:
- linters:
- revive
text: exported (method|function|type|const) (.+) should have comment or be unexported
path: "(framework|e2e|infrastructure/docker)/.*.go"
path: "(framework|e2e)/.*.go"
# Disable unparam "always receives" which might not be really
# useful when building libraries.
- linters:
Expand All @@ -124,12 +202,50 @@ issues:
- ifshort
text: "variable .* is only used in the if-statement"
path: controllers/mdutil/util.go
# Disable linters for conversion
- linters:
- staticcheck
text: "SA1019: in.(.+) is deprecated"
path: .*(api|types)\/.*\/conversion.*\.go$
- linters:
- revive
text: exported (method|function|type|const) (.+) should have comment or be unexported
path: .*(api|types)\/.*\/conversion.*\.go$
- linters:
- revive
text: "var-naming: don't use underscores in Go names;"
path: .*(api|types)\/.*\/conversion.*\.go$
- linters:
- revive
text: "receiver-naming: receiver name"
path: .*(api|types)\/.*\/conversion.*\.go$
- linters:
- stylecheck
text: "ST1003: should not use underscores in Go names;"
path: .*(api|types)\/.*\/conversion.*\.go$
- linters:
- stylecheck
text: "ST1016: methods on the same type should have the same receiver name"
path: .*(api|types)\/.*\/conversion.*\.go$
# hack/tools
- linters:
- typecheck
text: import (".+") is a program, not an importable package
path: ^tools\.go$
# Ignore ifshort false positive
# TODO(sbueringer) false positive: https://github.com/esimonov/ifshort/issues/23
- linters:
- ifshort
text: "variable 'isDeleteNodeAllowed' is only used in the if-statement.*"
path: ^internal/controllers/machine/machine_controller\.go$

run:
timeout: 10m
build-tags:
- tools
- e2e
skip-files:
- "zz_generated.*\\.go$"
- ".*conversion.*\\.go$"
skip-dirs:
- third_party
allow-parallel-runners: true
12 changes: 12 additions & 0 deletions .markdownlinkcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
}
],
"timeout": "5s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206]
}
Loading

0 comments on commit f9c215c

Please sign in to comment.