Skip to content

Commit 7d31ac3

Browse files
committed
ci: fix CI by removing go.work before lint/vet/security steps
1 parent ec8f89a commit 7d31ac3

3 files changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ jobs:
5050
with:
5151
go-version: ${{ env.GO_VERSION }}
5252
cache: true
53-
- name: gofumpt diff
53+
- name: Remove go.work
54+
run: rm -f go.work go.work.sum - name: gofumpt diff
5455
run: |
5556
go install mvdan.cc/gofumpt@latest
5657
out=$(gofumpt -l .)
@@ -74,7 +75,8 @@ jobs:
7475
with:
7576
go-version: ${{ env.GO_VERSION }}
7677
cache: true
77-
- uses: golangci/golangci-lint-action@v7
78+
- name: Remove go.work (local dev only)
79+
run: rm -f go.work go.work.sum - uses: golangci/golangci-lint-action@v7
7880
with:
7981
version: v2.1.0
8082
install-mode: goinstall
@@ -123,10 +125,13 @@ jobs:
123125
with:
124126
go-version: ${{ env.GO_VERSION }}
125127
cache: true
126-
- name: govulncheck
128+
- name: Remove go.work
129+
run: rm -f go.work go.work.sum - name: govulncheck
127130
run: |
128-
go install golang.org/x/vuln/cmd/govulncheck@latest
129-
govulncheck ./...
131+
- name: Remove go.work
132+
run: rm -f go.work go.work.sum go install golang.org/x/vuln/cmd/govulncheck@latest
133+
- name: Remove go.work
134+
run: rm -f go.work go.work.sum govulncheck ./...
130135
- name: gosec (advisory)
131136
continue-on-error: true
132137
run: |

internal/check/registry.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import (
1212
type Severity = types.Severity
1313

1414
const (
15-
SeverityInfo Severity = types.SeverityInfo
16-
SeverityLow Severity = types.SeverityLow
17-
SeverityMedium Severity = types.SeverityMedium
18-
SeverityHigh Severity = types.SeverityHigh
15+
SeverityInfo Severity = types.SeverityInfo
16+
SeverityLow Severity = types.SeverityLow
17+
SeverityMedium Severity = types.SeverityMedium
18+
SeverityHigh Severity = types.SeverityHigh
1919
SeverityCritical Severity = types.SeverityCritical
2020
)
2121

internal/report/format.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ const (
2121
SeverityCritical Severity = types.SeverityCritical
2222
)
2323

24-
var (
25-
severityColors = [...]string{"\033[36m", "\033[34m", "\033[33m", "\033[31m", "\033[35;1m"}
26-
)
24+
var severityColors = [...]string{"\033[36m", "\033[34m", "\033[33m", "\033[31m", "\033[35;1m"}
2725

2826
// SeverityString returns the string representation with ANSI color codes.
2927
func SeverityString(s Severity) string {

0 commit comments

Comments
 (0)