diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 85f64a699..22e35d45f 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -1,16 +1,16 @@ name: Workflow on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ '**' ] + branches: ["**"] jobs: code-check: name: Check Go formatting, linting, vetting runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Run the formatter, linter, and vetter uses: dell/common-github-actions/go-code-formatter-linter-vetter@main with: @@ -21,7 +21,7 @@ jobs: # runs-on: ubuntu-latest # steps: # - name: Checkout the code - # uses: actions/checkout@v3.2.0 + # uses: actions/checkout@v4 # - name: Run the forbidden words scan # uses: dell/common-github-actions/code-sanitizer@main # with: @@ -31,16 +31,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.22" cache: false - name: Checkout csm-operator - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 with: - repository: 'dell/csm-operator' - path: 'csm-operator' + repository: "dell/csm-operator" + path: "csm-operator" - name: Run unit tests and check package coverage uses: dell/common-github-actions/go-code-tester@csm-operator-controllers with: @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Run unit tests and check package coverage uses: dell/common-github-actions/go-code-tester@main with: @@ -61,7 +61,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Run unit tests and check package coverage uses: dell/common-github-actions/go-code-tester@main with: @@ -72,7 +72,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Run Go Security uses: securego/gosec@master with: @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Run malware scan uses: dell/common-github-actions/malware-scanner@main with: @@ -92,20 +92,20 @@ jobs: name: Image Scanner runs-on: ubuntu-latest env: - BASE_IMG : ubuntu:latest + BASE_IMG: ubuntu:latest steps: - name: Set up Go 1.22+ - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ^1.22 id: go - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Build Docker Images - run: DEFAULT_IMG=csm-operator:latest make -o gen-semver docker-build + run: DEFAULT_IMG=csm-operator:latest make -o gen-semver docker-build - name: Scan controller Image uses: Azure/container-scan@v0 - env: + env: DOCKLE_HOST: "unix:///var/run/docker.sock" with: image-name: csm-operator:latest diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 2109263c3..6e8a6caa3 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -14,17 +14,17 @@ jobs: name: golangci-lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: "1.22" cache: false - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Vendor packages run: | go mod vendor - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v5 with: - version: v1.55 + version: latest skip-cache: true diff --git a/.golangci.yaml b/.golangci.yaml index 603c01d4b..ce0bddb3a 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -8,6 +8,8 @@ issues: max-issues-per-linter: 0 max-same-issues: 0 new: false + exclude: + - "parameter 'clusterConfigData' seems to be unused, consider removing or renaming it as _" output: print-linter-name: true diff --git a/controllers/acc_controller.go b/controllers/acc_controller.go index e3eba580b..fd0e64f08 100644 --- a/controllers/acc_controller.go +++ b/controllers/acc_controller.go @@ -369,7 +369,6 @@ func (r *ApexConnectivityClientReconciler) ClientContentWatch() error { _, err = podsInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ UpdateFunc: r.handlePodsUpdate, }) - if err != nil { return fmt.Errorf("ClientContentWatch failed adding event handler to podsInformer: %v", err) }