Add GolangCI-Lint

This commit is contained in:
Holger Obermaier
2026-01-23 13:57:38 +01:00
parent 9e0f4d12e0
commit f2b965025a

View File

@@ -40,19 +40,23 @@ jobs:
run: | run: |
go install honnef.co/go/tools/cmd/staticcheck@latest go install honnef.co/go/tools/cmd/staticcheck@latest
# See: https://golangci-lint.run
- name: Install GolangCI-Lint
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
- name: Build MetricCollector - name: Build MetricCollector
run: make run: make
- name: Run MetricCollector once - name: Run MetricCollector once
run: ./cc-metric-collector --once --config .github/ci-config.json run: ./cc-metric-collector --once --config .github/ci-config.json
# See: https://github.com/golangci/golangci-lint-action
# Running the linter requires likwid.h, which gets downloaded in the build step # Running the linter requires likwid.h, which gets downloaded in the build step
#- name: Static Analysis with GolangCI-Lint - name: Static Analysis with GolangCI-Lint and Upload Report with reviewdog
# uses: golangci/golangci-lint-action@v4 run: |
# with: golangci-lint run | reviewdog -f=golangci-lint -reporter=github-check -filter-mode=nofilter -fail-level none
# version: latest env:
# args: --verbose REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Running the linter requires likwid.h, which gets downloaded in the build step # Running the linter requires likwid.h, which gets downloaded in the build step
- name: Run Static Analysis with go vet and Upload Report with reviewdog - name: Run Static Analysis with go vet and Upload Report with reviewdog