File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 99jobs :
1010 sonar :
1111 runs-on : ubuntu-latest
12+ env :
13+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
1214 steps :
1315 - uses : actions/checkout@v6
1416 with :
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."
Original file line number Diff line number Diff line change 1+ version : " 2"
2+
13linters :
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
You can’t perform that action at this time.
0 commit comments