Skip to content

Commit

Permalink
Makes golangci-lint use Go version from go.mod (#2935)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
  • Loading branch information
m1kola authored Mar 8, 2023
1 parent 783bebf commit 4634317
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
- name: Run linting checks
uses: "golangci/golangci-lint-action@v2"
uses: "golangci/golangci-lint-action@v3"
with:
version: "v1.46.0"
version: "v1.50.1"
10 changes: 6 additions & 4 deletions pkg/controller/operators/olm/overrides/inject/inject.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,12 @@ func InjectNodeSelectorIntoDeployment(podSpec *corev1.PodSpec, nodeSelector map[
// with the given corev1.Affinity. Any nil top-level sub-attributes (e.g. NodeAffinity, PodAffinity, and PodAntiAffinity)
// will be ignored. Hint: to overwrite those top-level attributes, empty them out. I.e. use the empty/default object ({})
// e.g. NodeAffinity{}. In yaml:
// affinity:
// nodeAffinity: {}
// podAffinity: {}
// podAntiAffinity: {}
//
// affinity:
// nodeAffinity: {}
// podAffinity: {}
// podAntiAffinity: {}
//
// will completely remove the deployment podSpec.affinity and is equivalent to
// affinity: {}
func OverrideDeploymentAffinity(podSpec *corev1.PodSpec, affinity *corev1.Affinity) error {
Expand Down

0 comments on commit 4634317

Please sign in to comment.