Skip to content

Commit e39f559

Browse files
authored
Merge pull request #12 from dynatrace-oss/dependabot/github_actions/golangci/golangci-lint-action-9
build(deps): Bump golangci/golangci-lint-action from 6 to 9
2 parents 29b0d65 + fadd84a commit e39f559

3 files changed

Lines changed: 22 additions & 13 deletions

File tree

.github/workflows/sast.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
go-version-file: go.mod
1818

1919
- name: Run golangci-lint
20-
uses: golangci/golangci-lint-action@v6
20+
uses: golangci/golangci-lint-action@v9
2121
with:
2222
version: latest

.github/workflows/sonar.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
jobs:
1010
sonar:
1111
runs-on: ubuntu-latest
12+
env:
13+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1214
steps:
1315
- uses: actions/checkout@v6
1416
with:
@@ -22,7 +24,12 @@ jobs:
2224
run: go test -race -coverprofile=coverage.out ./...
2325

2426
- name: SonarCloud Scan
27+
if: env.SONAR_TOKEN != ''
2528
uses: SonarSource/sonarcloud-github-action@master
2629
env:
2730
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
31+
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}
32+
33+
- name: SonarCloud Scan Unavailable
34+
if: env.SONAR_TOKEN == ''
35+
run: echo "Skipping SonarCloud scan because SONAR_TOKEN is not available in this workflow context."

.golangci.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters:
24
enable:
35
- gosec
@@ -8,15 +10,15 @@ linters:
810
- unused
911
- misspell
1012

11-
linters-settings:
12-
gosec:
13-
severity: medium
14-
confidence: medium
13+
settings:
14+
gosec:
15+
severity: medium
16+
confidence: medium
1517

16-
issues:
17-
exclude-rules:
18-
# Test files: relax some rules
19-
- path: _test\.go
20-
linters:
21-
- gosec
22-
- errcheck
18+
exclusions:
19+
rules:
20+
# Test files: relax some rules
21+
- path: _test\.go
22+
linters:
23+
- gosec
24+
- errcheck

0 commit comments

Comments
 (0)