Skip to content

Commit 4634317

Browse files
authored
Makes golangci-lint use Go version from go.mod (#2935)
Signed-off-by: Mikalai Radchuk <[email protected]>
1 parent 783bebf commit 4634317

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/sanity.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v2
22+
- uses: actions/setup-go@v3
23+
with:
24+
go-version-file: "go.mod"
2225
- name: Run linting checks
23-
uses: "golangci/golangci-lint-action@v2"
26+
uses: "golangci/golangci-lint-action@v3"
2427
with:
25-
version: "v1.46.0"
28+
version: "v1.50.1"

pkg/controller/operators/olm/overrides/inject/inject.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,12 @@ func InjectNodeSelectorIntoDeployment(podSpec *corev1.PodSpec, nodeSelector map[
235235
// with the given corev1.Affinity. Any nil top-level sub-attributes (e.g. NodeAffinity, PodAffinity, and PodAntiAffinity)
236236
// will be ignored. Hint: to overwrite those top-level attributes, empty them out. I.e. use the empty/default object ({})
237237
// e.g. NodeAffinity{}. In yaml:
238-
// affinity:
239-
// nodeAffinity: {}
240-
// podAffinity: {}
241-
// podAntiAffinity: {}
238+
//
239+
// affinity:
240+
// nodeAffinity: {}
241+
// podAffinity: {}
242+
// podAntiAffinity: {}
243+
//
242244
// will completely remove the deployment podSpec.affinity and is equivalent to
243245
// affinity: {}
244246
func OverrideDeploymentAffinity(podSpec *corev1.PodSpec, affinity *corev1.Affinity) error {

0 commit comments

Comments
 (0)