mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-01-27 15:01:45 +01:00
Add GolangCI-Lint
This commit is contained in:
16
.github/workflows/runonce.yml
vendored
16
.github/workflows/runonce.yml
vendored
@@ -40,19 +40,23 @@ jobs:
|
||||
run: |
|
||||
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
|
||||
run: make
|
||||
|
||||
- name: Run MetricCollector once
|
||||
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
|
||||
#- name: Static Analysis with GolangCI-Lint
|
||||
# uses: golangci/golangci-lint-action@v4
|
||||
# with:
|
||||
# version: latest
|
||||
# args: --verbose
|
||||
- name: Static Analysis with GolangCI-Lint and Upload Report with reviewdog
|
||||
run: |
|
||||
golangci-lint run | reviewdog -f=golangci-lint -reporter=github-check -filter-mode=nofilter -fail-level none
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user